DaveE Posted September 19, 2014 Report Share Posted September 19, 2014 Good Afternoon I have been scratching my head on this one for a while now, but havent solved it. I understand the logic of what I want to do, but the code beats me I need to send a 3 digit Julian Date from the PLC to a Serial device. I understand how to send from the screen, thats the easy bit However its he Math required to set the Julian date I want the Julian Date to be visible on the screen, but not changeable (I know not to set as keyboard input ) The Julian date is simply the number of days that have elapsed this year ie the difference between Jan 1 2014 and today, thats the math involved. However on Jan 1 2015 it will be Julian date of 001....Has to change automatically Thats the bit I cant figure out both the Math and the auto change any suggestions? Thanks Link to comment Share on other sites More sharing options...
TozoM8 Posted September 20, 2014 Report Share Posted September 20, 2014 You can use SI32. If it is = with 0101 reset tour Julian display. Then if the J display =0 add 1. Link to comment Share on other sites More sharing options...
Henny Posted September 20, 2014 Report Share Posted September 20, 2014 Hello Dave Atached is a Visilogic example that I tested with a V350. Today at 20-9-2014 it gives me a result of 263 into MI2 and if I understand you correctly that is what you want to accomplish? The only thing that has to be taken care of is that the controller has the correct date and time and the logic will do the rest. Hope it helps you? Kind regards Henny Julian Date.vlp Link to comment Share on other sites More sharing options...
DaveE Posted September 23, 2014 Author Report Share Posted September 23, 2014 Henny Thanks very much I am dowloading now and will use I really appreciate that Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now