bakerboy_99ca
Member
Hi Guys,
I trying to see if anyone has been able to get the Julian Date logic for the SLC family. I have found this thread ... http://www.plctalk.net/qanda/showthread.php?t=22008&highlight=julian but I cannot see how this would work. The line that determines if it is a leap year does not make any sence and I know the calculation is much more involved. Also, the last line of code where he uses N255:[S:38], I have no idea what this entails?...I entered the code for fun and it does not work on my SLC 5/04.
I eventually want to compare the julian date of a day that I know is a sunday of a paticular year to todays julian date and work out if today is a sunday. Every sunday night our midnight shift gains an extra hour of work on a paticular robotic cell due to there not being an afternoon shift and the 2 shifts overlap by 1 hour. I then want to add that extra hour of production data into my excel sheet but just on sunday's... any ideas? I could just set up a day counter 0=monday - 6=sunday but was just wondering if anyone has tackled this before and tried to write the logic?
Thanks Mark
I trying to see if anyone has been able to get the Julian Date logic for the SLC family. I have found this thread ... http://www.plctalk.net/qanda/showthread.php?t=22008&highlight=julian but I cannot see how this would work. The line that determines if it is a leap year does not make any sence and I know the calculation is much more involved. Also, the last line of code where he uses N255:[S:38], I have no idea what this entails?...I entered the code for fun and it does not work on my SLC 5/04.
I eventually want to compare the julian date of a day that I know is a sunday of a paticular year to todays julian date and work out if today is a sunday. Every sunday night our midnight shift gains an extra hour of work on a paticular robotic cell due to there not being an afternoon shift and the 2 shifts overlap by 1 hour. I then want to add that extra hour of production data into my excel sheet but just on sunday's... any ideas? I could just set up a day counter 0=monday - 6=sunday but was just wondering if anyone has tackled this before and tried to write the logic?
Thanks Mark