GSV does nothing

Fastoholic

Member
Join Date
Mar 2024
Location
georgia
Posts
3
So, I'm really just trying to get some experience by practicing with arrays. I'm using studio 5000 v33.

I have one rung with an XIC bit that's tied to a push button input with a ONS and a GSV copying to a destination button_press_log[10,7]. My intent was to store multiple time stamps. I set the time in the controller properties by my workstation. I don't get any errors. I have shut down everything and restarted and still nothing. Fields in GSV are set WallClockTime, nothing, DateTime(tried LocalDateTime also), Button_Press_Log[0,0].

I set to a periodic task of 10ms. Still nothing. When I hit my push button the XIC shows it's activated (rung illuminates/online) but nothing happens. In my monitor of the array there is no data. I can manually change the bottom field of the GSV in my rung and the first position of my array[0,0] will immediately have that value but nothing else. The rest remains zeros. If I change the bottom field of the GSV it goes to the new value I typed into my array but the rest is still zeros.

I also tried it without the ONS. Still nothing.

I tried searching google but nothing. I'm assuming this is something simple so any help is greatly appreciated.
 
Obvious question: Are the left and right rails of your logic showing green? Just because the XIC and the rung around it highlights green doesn't mean the logic is actually running, just that that bit is on (which if it is an actual input or alias thereof it will regardless).
 
Obvious question: Are the left and right rails of your logic showing green? Just because the XIC and the rung around it highlights green doesn't mean the logic is actually running, just that that bit is on (which if it is an actual input or alias thereof it will regardless).
Ah, I knew it had to be something easy. I just couldn't see the forest from the trees. I was in rem prog mode not rem run. Thank you
 
I think your problem is that you're trying to have data in a 1-dimensional array (DINT[7] - what the WallClockTime uses) into a 2-dimensional array (Button_Log[10,7]. Because the array type is wrong for the GSV command, the function simply won't work.

You'd have better results if you put the GSV result into a regular DINT[7] array, then COP the DINT[0] to Button_Log[Index,0] for a Len of 7.

EDIT: Or you might have other problems.
 
I think your problem is that you're trying to have data in a 1-dimensional array (DINT[7] - what the WallClockTime uses) into a 2-dimensional array (Button_Log[10,7]. Because the array type is wrong for the GSV command, the function simply won't work.

You'd have better results if you put the GSV result into a regular DINT[7] array, then COP the DINT[0] to Button_Log[Index,0] for a Len of 7.

EDIT: Or you might have other problems.
Thank you Aardwizz. It was that I was in rem prog instead of rem run. Once I was in rem run it worked like it was supposed to. I also had some copies to shift the data around and index it in the 10 position array.
 
Obvious question: Are the left and right rails of your logic showing green? Just because the XIC and the rung around it highlights green doesn't mean the logic is actually running, just that that bit is on (which if it is an actual input or alias thereof it will regardless).

Side warning, just because your rails are green doesn't mean the logic is executing, just that a JSR exists to it.

Made this mistake duplicating a JSR. Toggle bit between JSR | ROUTINE_OLD or JSR | ROUTINE_NEW. Later someone was troubleshooting ROUTINE_OLD, not realizing it wasn't being called. Later renamed it ROUTINE_NO_JSR and deleted the JSR.
 

Similar Topics

I'm trying to dig to the source of a minor "recoverable" system fault throwing a fault light on a machine that has been confusing my operator...
Replies
3
Views
85
Hello all, I know in the past it's been the case that we wanted to limit the total number of GSV calls per scan of the PLC. Is that still the...
Replies
2
Views
661
Hello, I have a question regarding the status checking of the module in the secondary chassis in a redundancy setup. CHASSIS 1 ...
Replies
6
Views
1,133
Hello Members We have a controllogix redundancy setup and need to display the status of redundancy in panelview. I have found in the manual the...
Replies
8
Views
1,261
Good Morning Everyone, I'm looking to use the GSV instruction to get I/O fault codes for my project so I know if there's a comms issue in my E/IP...
Replies
5
Views
871
Back
Top Bottom