glenncooper
Member
Hello.. I'm working to get myself up to speed with the use of the GSV instruction to retrieve controller time values in the Logix5000 world. But so far I'm just getting "0"s back. I'm sure I'm doing some bonehead thing here, and would love some insight on this. Here are the details:
> I'm using an older copy of RSLogix5000 (version 17 using firmware 16) to communicate with an emulated controller.
> I am online with the emulated controller, and the controller is in "Run Mode".
> If I right click on the controller from the navigation pane, I can go to the Date/Time tab and see that the controller is reporting the correct date and time.
> I have the GSV instruction alone on the first rung of the Main Routine under the Main Program in the Main Task. I have a timer running in this routine to verify that the routine is executing.
> The GSV is setup as follows:
Class Name: WallClockTime
Instance Name is blank
Attribute Name is LocalDateTime (have also tried DateTime).
Dest: CurrDateTime.Year
Where CurrDateTime is a controller tag with data type "DATE_TIME", which is a user defined data type.
> DATE_TIME has these members, all DINT;
Year
Month
Day
Minutes
Seconds
MicroSeconds
These all align with members of LocalDateTime for WallClockTime
> When I monitor the elements of CurrDateTime, such as CurrDateTime.Year (and all others) I see only 0's.
Any thoughts and help here would be much appreciated.
> I'm using an older copy of RSLogix5000 (version 17 using firmware 16) to communicate with an emulated controller.
> I am online with the emulated controller, and the controller is in "Run Mode".
> If I right click on the controller from the navigation pane, I can go to the Date/Time tab and see that the controller is reporting the correct date and time.
> I have the GSV instruction alone on the first rung of the Main Routine under the Main Program in the Main Task. I have a timer running in this routine to verify that the routine is executing.
> The GSV is setup as follows:
Class Name: WallClockTime
Instance Name is blank
Attribute Name is LocalDateTime (have also tried DateTime).
Dest: CurrDateTime.Year
Where CurrDateTime is a controller tag with data type "DATE_TIME", which is a user defined data type.
> DATE_TIME has these members, all DINT;
Year
Month
Day
Minutes
Seconds
MicroSeconds
These all align with members of LocalDateTime for WallClockTime
> When I monitor the elements of CurrDateTime, such as CurrDateTime.Year (and all others) I see only 0's.
Any thoughts and help here would be much appreciated.