Forums.MrPLC.com: WALLCLOCK GSV - Forums.MrPLC.com

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

WALLCLOCK GSV Wall Clock System Value Rate Topic: -----

#1
User is offline   sdericf 

  • Hi, I am New!
  • Pip
  • Group: MrPLC Member
  • Posts: 4
  • Joined: 10-March 05
:shrug:

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
0

#2
User is offline   navillusi 

  • System Integrator
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 208
  • Joined: 22-January 03
  • Location:Nottingham U.K.
  • Country:United Kingdom
    United Kingdom
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
If debugging is the process of removing bugs, then programming must be the process of putting them in

East Midlands Automation Ltd
0

#3
User is offline   Contr_Conn 

  • Sparky
  • PipPipPip
  • Group: MrPLC Member
  • Posts: 426
  • Joined: 07-September 03
  • Country:United States
    United States
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

This post has been edited by PLC_Cables: 10 March 2005 - 05:36 PM

0

#4
User is offline   sdericf 

  • Hi, I am New!
  • Pip
  • Group: MrPLC Member
  • Posts: 4
  • Joined: 10-March 05
Thanks guys.

I added another DINT and it works fine.

You guys are the greatest

:shrug:
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users