Reconfigure an I/O Module Programmatically

Follow these steps to reconfigure an I/O module programmatically.
You can reconfigure an I/O module from your logic by:
  • inhibiting the module,
  • using the MSG Module Reconfigure instruction, and
  • removing the inhibit.
    NOTE:
    DANGER:
    Inhibiting an I/O module forces it to revert to its program state values. The controller will not control the module until it is uninhibited and the connection is reestablished.
To reconfigure an I/O module programmatically
  1. Write logic to inhibit the module and remove the connection between the controller and the module:
    1. On a new rung, create a GSV instruction.
    2. Choose MODULE for the Object Class operand.
    3. Choose the appropriate I/O module for the Object Name operand.
    4. Only I/O modules with names can be accessed with GSV instructions.
    5. Choose MODE for the Attribute Name operand.
    6. Bit 2 of this attribute is the inhibit bit.
    7. Enter an INT tag for the Dest operand.
      integer (INT)
      An atomic data type consisting of a word used to store a 16-bit signed integer value (-32,768 to +32,767).
    8. Add an OR instruction on the rung after the GSV instruction.
    9. For the Source A operand, enter the tag in the Dest operand of the GSV instruction.
    10. For the Source B operand, enter the value 4 to set the second bit.
    11. For Dest, enter the same tag as in the Source A operand.
    12. Add an SSV instruction after the OR instruction.
    13. Choose MODULE for the Object Class operand.
    14. Choose the same I/O module as in the GSV instruction for the Object Name operand.
    15. Only I/O modules with names can be accessed with SSV instructions.
    16. Choose MODE for the Attribute Name operand.
    17. Bit 2 of this attribute is the inhibit bit.
    18. For the Source operand, enter the same tag used in the GSV Dest operand.
    19. Write logic to change the configuration tag for the module.
  2. Write logic to uninhibit the module and reestablish the connection:
    TIP:
    Make sure that the module is actually inhibited.
    1. On a new rung, create a GSV instruction.
    2. Choose MODULE for the Object Class operand.
    3. Choose the same I/O module for the Object Name operand.
    4. Choose EntryStatus for the Attribute Name operand.
    5. Enter a different INT tag for the Dest operand.
    6. Mask off the upper nibble of the destination tag by adding an AND instruction.
    7. Use the tag in the GSV Dest operand as the Source A operand.
    8. Use the value 16#FF00 for the Source B operand.
    9. Use the same tag for the Dest as in the Source A operand.
    10. Compare that tag to the value for inhibited by adding an EQU instruction.
    11. Use the AND Dest operand as the Source A operand.
    12. Use the value 16#6000 (the value meaning inhibited) for the Source B operand.
  3. Uninhibit the module by adding a GSV instruction:
    1. Choose MODULE for the Object Class operand.
    2. Choose the same I/O module for the Object Name operand.
    3. Choose MODE for the Attribute Name operand.
    4. Bit 2 of this attribute is the inhibit bit.
    5. Enter an INT tag for the Dest operand.
    6. Add an AND instruction on the rung after the GSV instruction.
    7. For the Source A operand, enter the tag in the Dest operand of the GSV instruction.
    8. For the Source B operand, enter the value 16#FFFB to clear the second bit.
    9. For Dest, enter the same tag as in the Source A operand.
    10. Add an SSV instruction after the AND instruction.
    11. Choose MODULE for the Object Class operand.
    12. Choose the same I/O module as in the GSV instruction for the Object Name operand.
    13. Only I/O modules with names can be accessed with SSV instructions.
    14. Choose MODE for the Attribute Name operand.
    15. Bit 2 of this attribute is the inhibit bit.
    16. For the Source operand, enter the same tag used in the GSV Dest operand.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.