Is there a way to import devices?
We have multiple locations that are Identical and compose or more than 50 devices with its own adressing per devices.
Thanks,
Is there a way to import devices?
We have multiple locations that are Identical and compose or more than 50 devices with its own adressing per devices.
Thanks,
There’s no device import/export right now.
You can either script the setup of devices using system.device.addDevice or restore a backup to each location that already has the devices configured.
Ok, so I can create a program to do so.
Thanks,
Why would I have this error:
java.lang.Exception: Device driver ‘MODBUSTCP’ doesn’t exist
Used the syntax in the doc???
Do you have that module installed?
Yes, I have it. and by default, it is free, so I’m not sure what really means “Do I have that module installed?”
Driver Type listed in Doc:
Legacy Allen-Bradley CompactLogix CompactLogix
Legacy Allen-Bradley ControlLogix ControlLogix
Simulators Dairy Demo Simulator DairyDemoSimulator
DNP3 Driver Dnp3Driver
Allen-Bradley Logix Driver LogixDriver
Allen-Bradley MicroLogix MicroLogix
Modbus RTU ModbusRtuOverTcp
Modbus TCP ModbusTcp
Omron NJ Driver com.inductiveautomation.omron.NjDriver
Allen-Bradley PLC5 PLC5
Siemens S7-300 S7300
Siemens S7-400 S7400
Siemens S7-1200 S71200
Siemens S7-1500 S71500
Allen-Bradley SLC SLC
Simulators SLC Simulator SLCSimulator
Simulators Generic Simulator Simulator
TCP Driver TCPDriver
UDP Driver UDPDriver
Those types are case-sensitive, as all things involving computers should be
The error message says you used MODBUSTCP
but the docs say it’s ModbusTcp
.
Agreed, but the error is capitalised, not the code:
deviceName = "IS" + str(i) + ".CB" + str(j)
deviceProps = {
"HostName" : "10.10.10." + str((i*10)+j),
"Port" : 502,
"zeroBasedAddressing" : "false"
}
system.device.addDevice("ModbusTcp",deviceName,deviceProps)
Can you try calling it with the function arguments specified like the examples?
system.device.addDevice(deviceType = "S71500", \
deviceName = "My_S7_1500_Device",\
deviceProps = newProps )
Removed all the the trial modules:
Name : Version : Description : License : State :
: Modbus Driver : 5.9.6 (b2018012914) : A driver for communicating with devices via Modbus-TCP. : Activated :
: OPC-UA : 4.9.6 (b2018012914) : A cross-platform OPC-UA server. : Activated :
: UDP and TCP Drivers : 4.9.6 (b2018012914) : Drivers for receiving and parsing UDP or TCP packets. : Activated :
: User Manual : 4.9.6 (b2018012914) : Provides an offline version of http://docs.inductiveautomation.com. : Free :
The driver has a dash in it, oh well, lets try that.
I really need support on a documented feature that fails.
You need to call the function specifically using keyword arguments - there’s an older implementation of addDevice (kept for backwards compatibility) that required a ridiculous sequence of arguments.
deviceName = "IS1.CB1"
deviceProps = {
"HostName" : "10.10.10.10",
"Port" : 502,
"zeroBasedAddressing" : "false"
}
system.device.addDevice(deviceType="ModbusTcp", deviceName=deviceName, deviceProps=deviceProps)
Worked just fine in 7.9.10.
OK, so that actually worked. Need to type the argument and this works.
Great.
Once the devices are created, any way to get the Addresses in with code as well?
Thanks in advanced
For similar scenarios where I have repeatable gateway configs I use tags with direct Modbus addressing rather than setting up addresses in the gateway, then you can just import/export your tags as desired and do bulk edits if required in the xml or once imported.