Device Diagnostic Tags to Show PLC Status

To use a diagnostic tag to show the PLC status

Let's use the Is Connected tag to show the status of each PLC.

  1. Create a folder in Tag Browser to contain the status bits by right-clicking on the Tags folder and selecting New Folder.

  2. Name the folder Device Status and click OK.

  3. Drag in the Is Connected tag from the CLX device into the Device Status folder.

    images/download/attachments/6034102/image2015-4-8_9_12_44.png

  4. Right-click on the Is Connected tag and rename it to CLX.

    images/download/attachments/6034102/image2015-4-8_9_13_12.png

  5. Repeat step 3 and 4 for all device connections you have in Ignition. If you have 5 devices, you will have 5 tags.

    images/download/attachments/6034102/image2015-4-8_9_14_1.png

    Now that we have a tag for each of the 5 PLCs, let's display the status of each PLC. For example in our Header window, we can make a PLC graphic and color it based on the state: 0 = red, 1 = green.

  6. In the Project Browser, double-click the Header window to open it.

    images/download/attachments/6034102/image2015-4-8_9_14_34.png

    We will add a PLC graphic from Symbol Factory to the Header.

  7. From the Tools menu, select Symbol Factory.

    images/download/attachments/6034102/image2015-4-8_9_17_59.png

  8. From the Symbol Factory window, select Controllers in the list.

  9. Drag any device on the window to create the component (the PLC graphic).

    images/download/attachments/6034102/image2015-4-8_9_18_38.png

    Symbol Factory components are made of several subcomponets or paths that make up a vector-based graphic. If you expand the component in the Project Browser, you can see all the paths. You can also double-click on the component in the design space to select the individual subcomponets. Fill color can be applied to each of these sub-components (or paths) dynamically through property binding. But there are two problems with applying color to the entire component. One is that you would have to change the fill color of each subcomponent dynamically through property binding which can take some time. Two, you will notice that you cannot bind the fill paint to a gradient color. To resolve these two problems we use a special method as described here to apply a tint to the entire component.

  10. To apply tint to the entire component, duplicate the component by selecting it and then select Edit > Duplicate from menu or press Ctrl-D.

  11. Select the duplicated component, which is above the original component.

  12. Select Shape > Union from menu or click the Union button in the toolbar.
    This flattens the duplicated shape into a single shape.

    images/download/attachments/6034102/image2015-4-8_9_26_43.png

  13. Remove the outline of the shape by clicking on the pencil icon of the Stroke Paint property and selecting No Paint.

    images/download/attachments/6034102/image2015-4-8_9_27_16.png

  14. Bind the Fill Paint property to the CLX status tag. Notice when binding a color property to a tag, you get to choose a color for each state of the tag in Number-to-Color Translation. You can also make the colors to blink between two different colors.

  15. In Number-to-Color Translation, set value 0 = red, value 1 = green, and alpha channel of each color to 30 (make sure each color is semitransparent so you can see the actual symbol behind it).

    images/download/attachments/6034102/image2015-4-8_10_47_11.png

  16. Group the two components together into one by selecting both components from the Project Browser and clicking the Component > Group or Combine icon in the toolbar. Now they are one component.

    images/download/attachments/6034102/image2015-4-8_10_48_16.png

  17. To name the device, drag in the label component from the Display tab into the window under the graphic.

    images/download/attachments/6034102/image2015-4-8_10_48_42.png

  18. Set the label properties as follows:
    Text: ControlLogix
    Font: Dialog, Bold, 12
    Foreground Color: 255,255,255
    Horizontal Alignment: Center

    images/download/attachments/6034102/image2015-4-8_10_49_23.png

  19. Repeat for each PLC.

    images/download/attachments/6034102/image2015-4-8_10_49_58.png

    You can now see the status of each PLC based on the colors they display (0=red, 1=green).

Next ...

  • add link here