When configuring an I/O device, you have the option to set it to memory mode. This means that the I/O device will be created in memory and its values stored in memory at runtime.
Devices using memory mode are not connected to any hardware and write their values to a cache. The I/O device values can be read by many processes. The difference between a local variable and a device in Memory Mode is that an I/O device in Memory Mode will reside in the I/O Server's memory and will observe standard networking and redundancy rules of a standard I/O device.
Memory mode is useful when you are configuring a system for the first time, as you can design and test your system before connecting a physical I/O Device.
An I/O device with Memory set to TRUE or FALSE will behave differently in instances where Variable Tags share the same address.
For example:
Define a MODNET IODevice:
1 - INT1 (INT Tag)
2 - DIG1 (DIG Tag for bit0 of INT1)
3 - DIG2 (DIG Tag for bit1 of INT1)
At runtime the Display Client will show:
In both instances the Override and Control Mode settings for each tag (INT1, DIG1, DIG2) did not affect the other tag. Setting INT1 in Override or Control Inhibit mode did not set DIG1 or DIG2 in Override or Control Inhibit mode.
As with local variables, values in an I/O device using only memory mode are not retained when you shut down. However, if you set the Persist field to TRUE in the I/O devices properties, their values will be retained. For more information on local variables, refer to Local Variables.
See Also
Published June 2018