Potential Logic Instruction Help

Cajmccormick

Member
Join Date
Aug 2018
Location
Ontario
Posts
12
Hi all,

I am currently working on a project where i need the to get the Julian date from the PLC (which i have now done). But now the customer wants the 3 digit Julian DAY, so what i was thinking logic wise, was for years to come i will compare the year to the Julian date # of the beginning of that year and then just subtract the current Julian date number from that beginning that year. That being said, is there an instruction in Studio 5000 that becomes true once there is a variance of 1 in the code? But continuously doing so. For example when 2018 changes to 2019, 365 days are added to the Julian date which is then compared with that years current date.

Thanks guys
 
Since you are using Studio 5000, for a transition, you can use the DTR instruction. It will pulse a one shot out whenever the input values differ.


I would add a routine to do the calculation manually, based on whether or not it is a leap year anyway in order to keep your Julian Day value correct through power cycles.


A fairly simple routine in ST can do that, just add up the days in each expired month, and add to the current day of the month. Thinking it over more, I would just run that calculation to calculate the day of the year, it won't take any processor power up.
 
Last edited:
Judging by Wikipedia, I'd say it's astronomy related.


Well, sort of.... It is just a count of the time since January 1, 4713 BC. That date was the start of three astronomical / timekeeping cycles. The group of three cycles aligns once every 7,980 years, so the next alignment will be in the year 3267, if anyone is around to care.


The whole number portion of the Julian Day is the actual count in days since 1/1/4713BC (zero based). The fractional portion can be used to indicate the time of the current day.



One reason it is used, and more often then not in production environments, it it definitively gives a specific number for a day, that can't be confused with anything else. We use a code, hyphen, JD, a colon and then a sequence number to track our lot numbers for some of our products. I can look up CP44-2458331:48 to see exactly what components were used in the making of that particular lot number.
 

Similar Topics

I found this article in today's news interesting ... as if we don't already have enough to worry about these days ... headline: here's a link...
Replies
5
Views
2,399
Hello, I believe I am experiencing some odd issues, and hopefully some of you may be able to help me out. This might be an issue regarding the...
Replies
4
Views
1,918
Hi, I have a chance to apply for an automation position coming up. I am not in an automation position right now, I am an E/I Project Lead. I have...
Replies
23
Views
7,856
Hi all. I am on the lookout for some terminals for distributing voltage potentials. You know, banks of terminals with 24V or 0V grouped...
Replies
14
Views
10,207
Is it possible to connect two potential free relays output to one 240V supply and return?
Replies
3
Views
1,731
Back
Top Bottom