Jython Script to read Internal Database using javadocs

CJ_Johnson
Mon, 04 Mar 2024 16:51:27 +0000
Ignition

My team currently has an automation setup to quickly add devices to gateways but we need a way to query the list of configured devices and their connection paths and other parameters.

As of now, I can access the the parameters I need by manually running SQL queries via the web UI @ main/web/status/sys.internaldb?10

Example of the queries
DEVICESETTINGS.NAME as name,
LOGIXDRIVERSETTINGS.HOSTNAME as logix_hostname,
COMPACTLOGIXDRIVERSETTINGS.HOSTNAME as compactlogix_hostname,
CONTROLLOGIXDRIVERSETTINGS.HOSTNAME as controllogix_hostname,
S71500DRIVERSETTINGS.HOSTNAME as siemens_hostname,
LOGIXDRIVERSETTINGS.SLOTNUMBER as logix_slot,

I have many gateways to go through and automating this effort would be great.

Is there a way to read tables off the internal database and use the result in a Jython script using the javadocs?

For example for the devicesettings table, I would want to iterate over each device on the gateway and record the following fields (description, enable, general,id,name,type) described here. ignition 7.9.5 API
com.inductiveautomation.xopc.driver.api.configuration.DeviceSettingsRecord

17 posts - 5 participants