Skip to content

LabJack Client Action

The LabJack Client action in Machinechat JEDI enables seamless communication with LabJack devices for data acquisition and control. This action supports both read and write operations, allowing for comprehensive interaction with LabJack hardware and sensors.

Key Features:

  • Read and Write Capabilities: Effortlessly read data from and write data to LabJack devices.
  • Multiple Operations: Add one or more read and write operations to a single LabJack Client action.
  • LabJack Read Operation: Configure operations to retrieve data from specific registers in the LabJack device.
  • LabJack Write Operation: Set up operations to send data to specific registers in the LabJack device.

By using the LabJack Client action, you can integrate a wide range of LabJack devices and sensors into your Machinechat JEDI environment, enhancing your data collection, monitoring, and control capabilities.

Configuring LabJack Client Action

The LabJack Client action allows you to select the LabJack device and configure the connection settings for communicating with the device. You can then add one or more LabJack operations to the LabJack Client action.

LabJack Client Action Settings
LabJack Client Action Settings
  • Action Name: The name for this action. Every action in JEDI must have a unique name for easy identification. The action name helps in quickly recognizing and managing actions within your rules.

  • Action Type: The type of action being added. Select LabJack Client from the list of available action types. This specifies that the action will communicate with a LabJack device using the Modbus protocol.

  • Source/Destination Node ID: The Node ID part of the node.metric pair used in JEDI's data storage. This field represents the nodeID used to read data into (for read operations) or write data from (for write operations).

  • LabJack Device: The specific LabJack device being used. Select the LabJack device from the dropdown list, which includes supported devices like T4, T7, T8, and Digit. This ensures the action is configured for the correct type of LabJack hardware.

  • LabJack Hostname or IP: The hostname or IP address of the LabJack device on the network. JEDI uses Modbus over TCP to communicate with LabJack devices. The IP address of the LabJack device can be found using LabJack's Kipling tool.

  • Port: The TCP port number used for communication. The default port for most Modbus devices is 502. If the LabJack device uses a different TCP port, enter the appropriate port number here.

  • Timeout: The duration, in seconds, for the operation to wait for a response from the LabJack device before timing out. This specifies how long JEDI should wait before considering the operation as failed.

  • Operations: The read and write operations to be performed by this LabJack Client action. Each LabJack Client action can include multiple read and write operations. Ensure not to create circular dependency loops with the operations.

Adding LabJack Read Operation

Perform read operations to retrieve data from LabJack device registers.

LabJack Read Operation Settings
LabJack Read Operation Settings
  • Source/Destination Metric: The data read from LabJack will be stored in this metric. This metric name is the metric part of the node.metric pair. The Node ID was specified in the previous form, when creating the "LabJack Client" action configuration. All operations in a LabJack Client action share the same Node ID defined in the "LabJack Client" action form.

  • LabJack Register: A list of all the registers in the supported LabJack devices. Not all devices support all registers. Refer to LabJack's documentation for your device to find out which registers are supported. You can also type a few characters to filter the list. The list may take a few seconds to load due to the number of registers available. The screenshot above shows AIN0 for the AIN0 register (Voltage Input on LabJack).

  • Address: If the register for your device is not in the list, you can enter the Modbus address of that register here. You can either select the register from the list or enter its address in this field.

  • Operation: A list of operations available for LabJack devices. The screenshot shows "LabJack Read" as the selected operation since this is a "LabJack Read" operation form.

  • Value Type: The datatype of the value being read. Select the correct datatype from the list provided. The screenshot shows FLOAT32 as the selected value type.

  • Value or Expression (Optional): For a "LabJack Read" operation, you can enter an expression to convert the raw data into a meaningful value. The form shows an example expression (-5.6548 * AIN0) + 15.509, which converts the voltage from a pH sensor connected to the AIN0 register into a pH value.

  • Set Precision: Check this box if you want to set the precision of the final result stored in the NodeID.Metric. The screenshot shows that the precision is set to 2 decimal places.

  • ADD: Click the ADD button to add this operation to the "LabJack Client" action you are configuring.

Adding LabJack Write Operation

Execute write operations to send data to LabJack device registers.

LabJack Write Operation Settings
LabJack Write Operation Settings
  • Source/Destination Metric: Enter a name for the metric that will be used as the data source for LabJack Write operation. This is the metric part of the node.metric pair, acting as the source register for the value . The Node ID was specified when creating the "LabJack Client" action configuration. All operations share the same Node ID defined in the "LabJack Client" action form.

  • LabJack Register: A list of all the registers in the supported LabJack devices. Not all devices support all registers. Refer to LabJack's documentation for your device to find out which registers are supported. You can also type a few characters to filter the list. The list may take a few seconds to load due to the number of registers available. The screenshot shows DAC0 for the DAC0 register (Analog Output on LabJack).

  • Address: If the register for your device is not in the list, you can enter the Modbus address of that register here. You can either select the register from the list or enter its address in this field.

  • Operation: A list of operations available for LabJack devices. The form shows "LabJack Write" as the selected operation since this is a "LabJack Write" operation form.

  • Value Type: The datatype of the value being written. Select the correct datatype from the list provided. The screenshot shows FLOAT32 as the selected value type.

  • Value or Expression: For a "LabJack Write" operation, you can enter an expression to transform the metric value or specify a constant value to write to the LabJack register. The form shows an example expression (VOUT * 0.5), which applies a transformation to the VOUT value before writing it to the DAC0 register.

  • Set Precision: Check this box if you want to set the precision of the final result that will be written to the LabJack register. The screenshot shows that the precision is set to 2 decimal places.

  • ADD: Click the ADD button to add this operation to the "LabJack Client" action you are configuring.

Need help? Contact our support team support@machinechat.io