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