system.device.addDevice - Deprecated
The version of this function is deprecated, See the system.device.addDevice for the current implementation.
Description
Adds a new device in Ignition. Use the appropriate parameters below for the device you want to create. Create a device manually in Ignition to see all of the possible parameters.
Syntax
system.device.addDevice(driver, deviceName, group, browseTimeout, readTimeout, writeTimeout, enabled, hostname, communicationTimeout, browseCacheTimeout, connectionPath, disableProcessorBrowse, slotNumber, concurrentRequests, showStringArrays, port, maxHoldingRegisters, maxInputRegisters, maxCoils, maxDiscreteInputs, reverseWordOrder, zeroBasedAddressing, spanGaps, allowWriteMultipleRegisters, allowWriteMultipleCoils, reconnectAfterTimeouts, reverseStringByteOrder, rightJustifyStrings, pduSize, rackNumber, cpuSlot, ports, inactivityTimeout, messageDelimiterType, messageDelimiter, fieldCount, fieldDelimiter, writebackEnabled, writebackMessageDelimiter, multicast)
Parameters
- String
driver
- The device driver, possible values are controllogix, micrologix, compactlogix, plc5, slc, modbus, modbusrtu, s71200, s7300, s7400, tcp, udp, dairysim, genericsim, slcsim. If the driver you wish to use is not listed, please see the current implementation of this function. - String
deviceName
- The name of the device. - Boolean
enabled
- Default is true. - String
hostname
- Integer
communicationTimeout
- Default is the default for the driver. - Integer
browseCacheTimeout
- Default is 120000. - String
connectionPath
- Default is "". - Boolean
disableProcessorBrowse
- Default is false. - Integer
slotNumber
- Default is 0. - Integer
concurrentRequests
- Default is 1. - Boolean
showStringArrays
- Default is false. - Integer
port
- Default is the default for the driver. - Integer
maxHoldingRegisters
- Default is 125. - Integer
maxInputRegisters
- Default is 125. - Integer
maxCoils
- Default is 2000. - Integer
maxDiscreteInputs
- Default is 2000. - Boolean
reverseWordOrder
- Default is false. - Boolean
zeroBasedAddressing
- Default is true. - Boolean
spanGaps
- Default is true. - Boolean
allowWriteMultipleRegisters
- Default is true. - Boolean
allowWriteMultipleCoils
- Default is true. - Boolean
reconnectAfterTimeouts
- Default is true. - Boolean
reverseStringByteOrder
- Default is false. - Boolean
rightJustifyStrings
- Default is false. - Integer
pduSize
- Default is 240. - Integer
rackNumber
- Default is 0. - Integer
cpuSlot
- Default is 1. - String
ports
- Integer
inactivityTimeout
- Default is 0. - String
messageDelimiterType
- Default is "Packet Based". - String
messageDelimiter
- Integer
fieldCount
- Default is 0. - String
fieldDelimiter
- Default is "". - Boolean
writebackEnabled
- Default is false. - String
writebackMessageDelimiter
- Default is "". - Boolean
multicast
- Default is true.
- String
Returns
- Nothing
Scope
- All
Code Examples
#Example 1: Add ControlLogix
system.device.addDevice(driver="controllogix", deviceName="CLX", hostname="10.10.1.10", slotNumber=0)
#Example 2: Add MicroLogix
system.device.addDevice(driver="micrologix", deviceName="MLX", hostname="10.20.7.77")
#Example 3: Add Modbus
system.device.addDevice(driver="modbus", deviceName="Modbus", hostname="10.20.7.77")
#Example 4: Add Dairy Simulator
system.device.addDevice(driver="dairysim", deviceName="SIM")