GSV instruction

learner

Lifetime Supporting Member
Join Date
Apr 2007
Location
British Columbia
Posts
81
Hi,

I would like to know if using too many GSV instruction in a continous routine for a 1756 Control logix would be an issue. I know it is not probably desirable to use too many of GSV in continuous routines but I'm just curious to know if for a controller with that many horse power it would be problem. I would also appreciate any suggestions with this regard.

Kind regards,

Learner
 
I've never tried to quantify it, but I know that a GSV or SSV does take more processor resources than ordinary logic instructions.

When I'm using them to annunciate faults or errors or status, I usually run them in a periodic task (or call a subroutine off a timer) once a second.

I use them most intensely when I have to be certain that a particular I/O connection is good before using the data in a routine. In those cases, I do run them every scan.
 
Relative to what?...

learner said:
...I would like to know if using too many GSV instruction in a continous routine for a 1756 Control logix would be an issue...

How many is too many? Relative to what? It's an open ended question really.

The GSV and SSV instructions are directly referencing the Object tags which already reside in the controller via the Module Object. So they do not have to send or fetch the data to the modules themselves. This makes them controller, or processor based only, which means they are pretty fast at executing, relatively speaking.

Instruction execution times are defined in microseconds (µS) and their effects on the scan time are always relative to the overall scan time. In other words, they have no real effect until they are having a detrimental effect on the scan time. So if you said you had 1000 GSV/SSV instructions in the same Continuous Task, and did not say what the current scan time is, or that it is too high, or that there appears to be scan time issues with other Tasks, then that quantity of those instructions is fine, in that case.

Treat them like any other instructions you are adding, except you know that they can add to the scan time quicker than most instructions do. Watch your scan time as it increases and if it becomes a worry, or an issue, then look to what you can do about it. As Ken suggests, execute certain operations only when needed (Event Task), or cyclically (Periodic Task), but this can go for any instructions which can help decrease the unwanted scan time.

As for them being "slower" at executing than most other instructions. This would be true in the main. But again, their effect on the scan time is relative to what's "left in the tank".

The execution of the GSV/SSV instructions, like many, depend on which processor they are used and which firmware. But also, for these particular instructions, which of the two is used, and to which Object and which Attribute is accessed. Some Attributes are executed upon much quicker than others depending on the whether an SSV or a GSV is used and which data type is in use.

For instance,

1756-L75 v21...

Instruction: GSV

Object: CONTROLLER

Attribute 1: TimeSlice = 3.00 µS
Attribute 2: ShareUnusedTimeSlice = 2.95 µS

Instruction: SSV

Object: CONTROLLER

Attribute 1: TimeSlice = 4.66 µS
Attribute 2: ShareUnusedTimeSlice = 2.28 µS

Instruction: GSV

Object: WALLCLOCKTIME

Attribute 1: ApplyDST = 1.65 µS
Attribute 2: TimeZoneString = 3.65 µS
Attribute 3: LocalDateTime = 27.55 µS

Instruction: SSV

Object: WALLCLOCKTIME

Attribute 1: ApplyDST = 2.65 µS
Attribute 2: TimeZoneString = 8.65 µS
Attribute 3: LocalDateTime = 22.65 µS

The "LocalDateTime" Attribute is the slowest to access of all the Object Attributes. When compared to an XIC instruction on the same platform above, which averages about 0.02 µS, there is a big difference, relatively speaking.

For a 1769-L23 v18, it can take up to 207.56 µS to execute the "LocalDateTime" Attribute on a GSV instruction. Again, that's pretty slow when compared to an XIC instruction which averages 4 µS on the same platform, relatively speaking.

It is all relative.

Personally, I don't tend to class instructions as slow or fast when executing. They take what they take to execute, for various reasons. Even if I know that multiple GSV/SSV instructions can add to the scan time somewhat quicker than others, it doesn't make much difference. If I feel I need them, I add them. I just keep an eye on scan times, if it all. It all depends on the application (I always say that!) and whether it is a factor or not.

For all instructions, their effect on the process is relative to the current scan time. In both what is required for the Continuous Task to perform correctly and what is required elsewhere i.e. Periodic Tasks.

Regards,
George
 
Curious where you got that scantime information George - did you find a document or technote somewhere, or did you just load up a PLC and test?
 
It's all on the Infonet my friend...

1756-RM087L-EN-P

In the PDF, click on the paper clip icon to the left to open "Attachments".
Here you should see the "1756-RM087L-EN-P.xlsm" spreadsheet file.
You can open or save it for your convenience.

It contains many tabs with cross references for the execution times for the different programming language instructions, across multiple Logix based platforms and their firmware revisions. It currently only goes up as far as firmware revision 21, but I'm sure it will be updated at some stage again, if the newer revisions do indeed improve on r21.

It also can help to explain why one platform may perform better than another, on scan time, or indeed even the same platform using a newer firmware revision.

Firmware updates, I'm sure to many, are usually only associated with bug fixes and feature enhancements. But are probably not too often associated with improving a processor's ability to execute its Instruction Set. But they often do.

On their own, they are minute details. But cumulatively, the execution times of instructions, for a particular hardware/firmware selection, can make the difference when an application's timings are crucial and any small increase in saved scan time is important.

It's definitely worth knowing this information, or having it to hand for reference.

Regards,
George
 
Last edited:
For most of our systems, I use GSV's by the ton to get and report the status of every connected I/O module. Since that isn't actually a critical application in most cases, I just phase the GSV instructions so that only one executes every scan. Simple enough to do, for a basic one, take an integer, add one to it every scan, and precede each GSV with an EQU comparison. The last GSV in the chain resets the integer to zero.

Where I have a huge amount of I/O connected, I'll use a bit shift register, advancing each scan or every other scan, and use a simple XIC to trigger each GSV, then again, feed in a new 1 to the shift register at the last GSV.
 

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
60
Hello Experts ! I'm making improvement in old program with rslogix5000 v20 and L72S controller. I want getting the real system hour and there is...
Replies
9
Views
3,553
Hello all, Looking for a bit of help with a some programming I'm working on. I'm probably missing something simple. I've got a routine setup for...
Replies
0
Views
1,115
Hello everyone, I am having an issue with random I/O faults on a ControlNet network. In the logic, there is a GSV instruction with LedStatus as...
Replies
3
Views
5,353
All I am studying a PLC program from another facility. It uses an SSV instruction and a GSV. Data in SSV, GSV as follows...
Replies
4
Views
7,404
Back
Top Bottom