Hi,
Thanks for the timely suggestions. I have looked at the GSV instruction list and found it little confusing as to how to assign the attribute, classname , instance name, destination parameters in GSV block using these Micrologix controller status bits(s:5/0- math overflow trap, s:1/13- major error halt, s:5/3 -major error executing user fault, s4:13 -timebase, s:0/1- overflow)
I have attached the RSLogix 500 rungs with status file instructions. Can anyone shed light on how to incorporate these in Studio 5000. Should I include the GSV instructions in Controller Fault Handler routines?. Thanks in advance.
Regards,
Akash
S:5/0 Overflow Trap Bit - It only exists on the Logix500 platform. Logix5000 sets a Minor Fault Type 4, Code 4 whenever an Over or Under-Flow occurs.
S:1/13 Major Error Halted - There is no point having PLC code to "inspect" this bit. By the time this bit gets set by the processor, it has already entered "Major Fault" shutdown, so no code can be executed.
S:5/3 Major Error Executing User Fault - similar to the above, it flags up a second Recoverable Major Fault while a previous one is being dealt with in a Fault Routine. Since you can only have one Fault Routine, the processor MUST go to Major Fault if this occurs, so again there's no code that can be executed.
S:4/13 Time Base - S:4 is a "free-running clock", or count value, incremented automatically by the processor. Many people use individual bits from this typically to flash lamps. From the "Help" on the SLC Status File, bit 13 will toggle on and off every 163,840mS. Logix5000 has no "free-running clock" like this, and there would be several ways to "re-engineer" this functionality, depending on what it is used for, and how accurate it needs to be. You could use a periodic task and a counter, or a timer, or inspect the system clock values using GSV.
S:0/1 Overflow - This is a status bit set by the processor when the result of an arithmetic instruction generates an Overflow, or Underflow. (The "Trap" bit is also set at the same time - see above). Programmers should inspect this bit, and act on it accordingly, to prevent erroneous data being used in following code. Logix5000
arithmetic status bits exist, and you can XIC them as you wish. They are....
S:V Overflow (or Underflow)
S:C Carry (or Borrow)
S:N Negative Result
S:Z Zero Result
NOTE : The programming software makes no attempt to highlight these S:x bits like it does normal BOOL tags. It knows they could be toggling on and off all through a user's program, so doesn't green highlight a "true" state.