Quantcast
Channel: Allen Bradley / Rockwell Automation Latest Topics
Viewing all articles
Browse latest Browse all 3721

Converting Floating Point - TIME...Help needed please

$
0
0

Hi all,

I am back again with another head scratcher well (2 actually but they are related). First up I am using Logix Studio with a CompactLogix at v24.00

First up I have a time input from Scada as a floating point (REAL) which is an operator input

I have my clocktime in the PLC set as a DINT using GSV with a resulting structure of

PLCDateTime.Year

PLCDateTime.Month

PLCDateTime.Day

PLCDateTime.Hour

PLCDateTime.Minute

PLCDateTime.Second

PLCDateTime.Millisecond

How can I take the operator input (for example 16.30) and split it so I can send the Hours (16) to a DINT in a similar structure called ScadaSchedule.Hour and the minutes (30) to ScadaSchedule.Minute. I then want to compare the .Hour and .Minute from ScadaSchedule and PLCDateTime and trigger start stop times based on the comparison

Next I need to set up 5 time schedules (not disimilar to a central heating timer)

1. A fixed start time and stop time which runs every day - 16:00 - 19:00

2. 4 Manual schedules which the operator can input in Scada based on the information he gets for that days generation requirements, so he might get a manifest that says to run between 08.00 and 10.00 then later at 12.00 to 14.00 and so on

I need to be able to store the schedules in the PLC and issue my start and stop commands and account for any overlap with the automatic schedule. At Midnight I want to reset all schedules and ignore them until the operator inputs the schedule times.

Any help would be greatly appreciated

Thanks

 

Dan

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 3721

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>