Jump to content

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.