PLC Design

When programming PLCs to work effectively with IPFusion, a well-structured approach to design and logic is essential.

Tag List

Start by establishing a thorough Tag list for all doors, categorized by their type and specific functionalities. This foundational step ensures that tags, addresses, and functionality within the PLC are clearly identified and accessible to IPFusion. Best practice is to use a Word Array for Status and a Word Array for Commands. Each door is assigned a unique index within the array that is the same for both Status and Command arrays. Typically, each array can handle about 100 Words.

Example

DOOR_CMDS[] MW11400 - MW11599 Array of Words
DOOR_STATS[] MW11400 - MW11599 Array of Words
Door Array Index Address Status Tag Command Tag
Unit D Cell Door 1 0 MW11400 DOOR_STATS[0] DOOR_CMDS[0]
Unit D Cell Door 2 1 MW11401 DOOR_STATS[1] DOOR_CMDS[1]
... ... ... ... ...
Unit D Sally Port Inner Door 88 MW11488 DOOR_STATS[88] DOOR_CMDS[88]

Command Values

Each Command that can be issued to a door should be mapped to a specific integer value. For instance, commands like "Unlock" or "Lock" might have values like "1" or "3". These values are arbitrary but should be consistent for all doors in all PLCs. For example:

Value Command Description
1 Unlock
2 Maintain Unlock
3 Lock
4 Enable REX
5 Disable REX
Note: If a specific door type does not support a command, it will not be made available to the Operator within the Graphical Interface. For additional protection, the PLC should ignore commands that are invalid for a specific door type.

Visual Representation Style

The next step is to choose how door state is represented. There are two main ways that IPFusion Partners approach visual representation of door status.

Single State

This is common when the Door shows one unique state at a time (usually top priority state, color animations only), typically in simplified environments, where the doors are showing secure/unsecure and maybe one or two other states. A door will only ever be in a single state at any given time. In this case, all logic is performed in the PLC, and the IPFusion icons reflect a single state mapped to a single value.

Example

Status Word Bit Status Word Int Status Visual Description Preview
1 2 Secure Bright Green, Solid
2 4 Secure REX Disabled Dark Green, Solid
3 8 Unsecure Bright Red, Solid
4 16 Unsecure REX Disabled Dark Red, Solid
5 32 Forced Open Alarm Orange, Flashing
6 64 Fault/No Communication Magenta, Solid
7 128 Acknowledged Bright Grey, Solid

Composite Icons

In contrast, a more granular approach can be adopted to enhance situational awareness or assist with color blindness. This method involves breaking out the door’s various elements into multiple components, such as Door Position, Lock Position, Masked Status, Request to Exit, or Alarms. Each component is represented by an individual bit in the 16-bit Status Word, and visually represented by a different icon component. This allows operators to see a comprehensive view of the door status.

The status of each of the door components should be defined in the PLC with individual bits, so within IPFusion bits can be combined with "AND" and "OR" to define the visual representation.

Example

Bit Int Bit Set Bit Reset
1 2 Lock visible, Icon background green Lock hidden, Icon background red
2 4 Lock hidden, Icon background red Lock visible, Icon background green
3 8 Mask icon visible Masked icon hidden
4 16 Arrow icon visible Arrow icon hidden
5 32 Card icon visible Card icon hidden
6 64 Alarm icon visible Alarm icon hidden
7 128 Fire icon visible Fire icon hidden