Sign in to follow this  
Followers 0
sdericf

WALLCLOCK GSV

4 posts in this topic

I am having trouble with the GSV for WALLCLOCKTIME. I have set up a user defined data type called DateTime_Type and it has the following structure. Year DINT Month DINT Day DINT Hour DINT Minute DINT Second DINT I also have a tag called DateTime That uses the DateTime_Type My GSV is set up like this GSV Get System Value Class Name WALLCLOCKTIME Instance Name Attribute Name DateTime Dest DateTime.Year Can anyone tell me what I am doing wrong. Thanks

Share this post


Link to post
Share on other sites
That all looks ok, but your DateTime.year is a single DINT tag rather than an array. The wallclock time needs an array of 7 i.e. GSV WALLCLOCKTIME ? DateTime time[0] where time is an array[0..6] of DINT

Share this post


Link to post
Share on other sites
Your DateTime_Type is only 6 words Wallclock returns array of 7. Add one more DINT for fraction of the second and it sould work. Also you may try to change Dest to DateTime without .Year Edited by PLC_Cables

Share this post


Link to post
Share on other sites
Thanks guys. I added another DINT and it works fine. You guys are the greatest

Share this post


Link to post
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
Sign in to follow this  
Followers 0