Step 3: Setting up sensor nodes to JACE devices
BACnet nodes
Special Considerations
Important: It is important to not enable writeOnStart, writeOnUp or writeOnEnabled in the BACnet. The JACE may contain stale BACnet point values due to unsubscribed points, or a change in between polling intervals. If the JACE restarts or a BACnet device comes back online, the stale point data will be written to the BMS BACnet point. This can create equipment control problems and result in faults or equipment damage.
Many BMS systems cannot disable write commands from specific BACnet devices.
If the application requires the JACE to write to BACnet points, configure these points individually, and ensure that the BACnet driver writeOnStart, writeOnUp or writeOnEnabled settings are disabled.
Reference Material
For troubleshooting, refer to some of the following documents:
Tridium document – BACnet tuning suggestions 2019
Tridium document – Troubleshooting BACnet MS/TCP 2019
Tridium document – Using poll statistics in tuning poll rates 2019
Configuring a BACnet Network
BACnet Driver
You can only add one BACnet network, so no need to change name, but you can add multiple Network types to this BacnetNetwork, i.e. IP Port (default), EthernetPort, MSTP Port (RS485).
Open the bacnet palette in the Palette window. Drag a BacnetNetwork into Station: Config: Drivers
Inside BacnetNetwork: Local Device: , set Object ID; This must be unique. Recommended to use 36 (Tridium’s Bacnet vendor number) followed by the last 3 digits of IP address. For example, for a JACE at 150.229.111.156, use a device ID of 36156. As only one BACnet driver is permitted per JACE, this should ensure unique device ID’s.
Bacnet over IP Connection
Inside Station: Config: Drivers: BacnetNetwork: BACnet Comm: Network: IP Port: Link (AX Property Sheet view), pick adaptor with your IP adaptor port. Dm0 is first port, dm1 is second port.
Inside Station: Config: Drivers: BacnetNetwork: BACnet Comm: Network: IP Port (AX Property Sheet view) enable the port.
Discovery
Station: Config: Drivers: BacnetNetwork and Discover button should be available at the bottom of the page. Click Discover to search for devices. Can adjust search range.
Drag devices down to Database.
In Device Manager click on point shield to move to point manager. Hit discover and find all objects.
Sort by object type using column header
Can bring types in together (e.g. AI, DI etc).
Points need to be enabled.
Tuning Policies
Default policy is only one to begin with. To add additional policies, go to Station: Config: BacnetNetwork: Tuning Policy. Right-click, Duplicate and Rename the new files to your preferred categories (e.g., fast, slow, cov)
Change poll frequency (fast, slow, normal). Use slow for large number of points.
Change Use cov to true. Try not to utilise Use confirmed cov as it uses more comms.
If you double-click on Station: Config: Drivers: BacnetNetwork, inside the Database list, you can batch change policies on each point using multiselect.
The table below describes some issues you may face with BACnet networks and how you could resolve them.
Problem Type
Suggested Actions
Stale data due to queue full
Check for write queue overflow messages in the Application Director in the Platform.
Remove write-on-start for points
Increase queue size. The Bacnet worker has a default size of 1000 and can be increased if required. This property is located under the Server object on BACnet Comm.
Check for write queue overflow messages
Increase Min Write Time
Writing erroneous data to pooled Bacnet devices
IMPORTANT: Refer special considerations at start of document. Do Not Enable writeOnStart, writeOnUp or writeOnEnabled.
On the tuning policy you can control Write_On_Start, Write_On_Up and Write_On_Enabled.
writeOnStart controls whether Niagara will attempt to write values to all the writable points that have non-null values in our system when the Niagara station starts.
writeOnUp controls whether Niagara will attempt to write points in a BACnet device when the device goes from a down state to a not-down state.
writeOnEnabled controls whether Niagara will attempt to write points in a BACnet device when the device is enabled.
CoV subscription refused
Some devices only allow a certain number of CoV (change of value) subscriptions. Generally, for DCH, CoV is not required and polling is fine.
Unreliable Polling due to Overloaded Network
Use “Slow” poll frequency
Stale data due to Stale Time being too short, or nuisance Stale statuses
Default is zero, therefore point goes stale once unsubscribed.
Stale time is recommended to be at least three times expected poll cycle time.
Transport Lockup Issues
If you decrease the baud rate that should help quite a bit if you are having an issue with CPU usage.
2000 to 6000 ms should be good for the ADPU Segment Timeout
Limit ADPU retries to 1.
Writable Points
Select points (e.g. setpoints), multiselect, can change policy (e.g. cov).
Change type to Writable
Change to enabled (changing to writable turns them to disabled)
Can show the Write Column in the Database to view which points are readonly or OK or writable.
Disabled Points
Disabled points will the greyed out in the Database view of Bacnet Network: Device Name: Points. Select them and change to enabled if required.
Discoverable Points (Export)
Config: Drivers: BacnetNetwork: LocalDevice: Export Table
Discover > BqlQuery to find points on the Jace. Select parent folder to discover the points.
Add points to Exported Objects list, other devices can then discover these points.
Bacnet over RS485
Setting up a Bacnet Network defaults to IP. To implement a RS485 network.
Open palette > Bacnet > add MstpPort and drag to BacnetNetwork: BacnetComm: Network:
Setup Port Name, Baud Rate etc.
COV vs RPM
Station: Config: Drivers: BacnetNetwork: BacnetComm
: Server: Worker
Max Queue Size: can be set as large as needed; it is just an arbitrary limit on the max size of the queue of incoming requests from other BACnet clients to our BACnet server.
: Transport
Client Queue Size (Server Queue Size): is the queue size for client (server) requests at the transport layer - default of 100 can be easily increased as it doesn't incur additional memory overhead.
Lockup Threshold: timer for when Niagara thinks something unusual has gone wrong with the transaction. Niagara expects that it will either (a) get a response from the device - success or error, or (b) time out without a response from the device after apduTimeout * (retries + 1). The lockup threshold is therefore programmatically and automatically set above this, and if this timer is reached without either (a) or (b) happening, then it's an indication something is locked up in the transport layer and the transaction is reset.
apduTimeout - Our default time value is typically the best number. You don't want to make this timeout very long. This is how long we are waiting for a response from the device. Any device should be able to respond in 2 seconds. If it doesn't then something major is wrong and that needs to be fixed.
: Network
Routing Enabled: Is Niagara acting as a router? This should pretty much always be true; BACnet requires that a device connected to multiple networks route between them. If you have another device already routing to a network and don't need this station to route, you shouldn't create a port for that network. If a network misconfiguration is detected, this gets set to FALSE, unless "Maintain Routing Enabled" is set to TRUE.
Maintain Routing Enabled: controls if Niagara will keep its network layer intact when a packet is received that indicates network misconfiguration. Default value of false is probably better changed to TRUE in most cases. If left false and a misconfiguration is found, the enabled network ports are removed from the local router table and will need to be disabled/enabled in order to allow discovery on those networks.
Minimum Router Update Time: timer for detecting router loops when multiple devices claim to be the router to a network. Receipt of two I-Am-Rout-To-Network messages for a given DNET within this time frame will indicate a network misconfiguration. Set to 0 to disable this check.
Router Discovery Timeout: when Niagara attempts to discover a router in order to forward a message, it will try this long before giving up and telling the original sender we can't route its message.
Termination Time Value: used only for PTP connections; has no bearing otherwise.
Hidden slots (you must go to the slot sheet and un-hide via config flags)-
Slots on BacnetNetwork slot sheet-
worker: The BacnetNetwork's "async" queue for actions that need to be done during station operation, but which take enough time they can't be done on the engine thread. For example, uploading a device, subscribing for COV, etc., anything that requires BACnet comm, but isn't already on another thread. Polling, pinging, etc. are already on their own threads.
writerWorker: BacnetNetwork's "write" queue for posting proxy point writes. This will coalesce successive writes to the same point.
Should address QueueFullExceptions such as this -BacnetDevice {FCU613_082007}: javax.baja.util.QueueFullException javax.baja.util.QueueFullException. Recommend this value be set to 1.5 times the number of writable points.
NOTE: The write worker is used to subscribe COV., single threaded. Only one point at a time. The poll scheduler will work much better assuming devices utilize readPropertyMultiple and have a sizable maxApdu size. COV should only be used when values are static and always need to be subscribed. Never use for px subscribe. Only when needed for alarming.
CovWorker: Hidden property on the BACnet Network. Un-check the 'Hidden' Config flag to expose this on the property sheet. This is a queue. You may need to increase this queue to keep it from overflowing if there are a large number of points doing COV.
submitDeviceManagerJob, lookupXXX (all lookup actions): should not have a need to interact with these actions
MS/TP Link layer (under Network): Max Info Frames: Limits the number of messages the Jace can send before the token must be passed.
Bacnet Settings Checklist
Setup
Bacnet driver installed (only one per Jace)
Bacnet nodes discovered
Check all required points are enabled (not-greyed out)
Tuning policies setup. Use slow.
Set to RPM not CoV subscriptions.
Change WriteOnStart to writeOnEnabled
After Setup
Check for write queue overflow messages, QueueFullException errors in Application Director. If they are in writeWorker or readWorker, the maximum size of these queues need to be increased.
Check poll cycle time. Set Stale Time to larger than the poll cycle time (3x expected poll cycle time).
Check for ADPU errors, if so, reduce retries to 1, and set ADPU Segment Timeout (try 2000-6000ms)
If having CPU issues, baud rate can be reduced to assist.
Increase Min Write Time
Modbus nodes
Special Considerations
IMPORTANT: It is preferable to not enable writeOnStart, writeOnUp or writeOnEnabled in the Modbus configurations. The JACE may contain stale point values due to unsubscribed points, or a change in between polling intervals. If the JACE restarts or a Modbus device comes back online, the stale point data will be written to the device. This can create equipment control problems and result in faults or equipment damage.
If the application requires the JACE to write to Modbus devices, configure these points individually, and ensure that the Modbus gateway/network/device writeOnStart, writeOnUp or writeOnEnabled settings are disabled.
Modbus RTU Vs Modbus TCP
There are two main methods of Modbus communication, RTU and TCP.
Modbus RTU on the JACE uses RS485 serial interfaces via the RS485-A COM1 port and the RS485-B COM2 port. These ports are wired directly to the Modbus devices using the 2-core + shield cable in a daisy chain configuration.
Modbus TCP uses the JACE ethernet ports and a local area network. Modbus TCP uses Modbus packets wrapped in a TCP/IP wrapper.
Modbus TCP
Modbus TCP via the JACE will typically be provided via a Modbus TCP Gateway.
Configure the Gateway
In the Palette window open the modbusTcp palette.
Drag ModbusTcpNetwork into Station: Config: Drivers
NOTE: Unlike BACnet, multiple Modbus devices can be configured in one JACE.
Rename the Network, e.g. ModbusTcpGatewayBranch9.
Double-click on the Network and right-click Views AX Property Sheet.
Figure 1 - Modbus TCP Gateway Configuration
Work your way down the slots and configure them as per below.
Field
Setting
Notes
Enabled
Set as false until gateway setup is complete.
Alarm Source Info
Leave as default
Monitor
Ping Enabled
True
Ping frequency
1m
Alarm on Failure
Set to False
This will prevent the alarm console filling up with hundreds of ping failure/ping success alerts.
Startup Alarm Delay
Leave as 5m
Tuning policy
Min Write Time
Leave as default
Max Write Time
Leave as default
Write on start
Set to false
This will prevent erroneous commands being sent if the controller has been offline.
Write on up
Set to false
Write on enabled
Set to false
Stale Time
Leave as default
Poll Scheduler
Poll Enabled
Fast Rate
Leave as default (1s)
Adjust these if required. Faster polling provides more frequent data, but increases read failure rates.
Normal Rate
Leave as default (5s)
Slow Rate
Leave as default (1m)
Retry Count
2
Response Timeout
2s
Float Byte Order
Order3210
These are the global values, you can configure individual devices differently if required. If there are reading issues from the registers, refer to the gateway manual. It may need to be changed to 1032, but try changing the device first and see whether this resolves the issue.
Long Byte Order
Order3210
Use Preset Multiple Register
False
If there are reading issues from the registers, refer to the gateway manual. It may need to be changed to true.
Use Force Multiple Coil
false
Max Fails Until Device Down
2
If the gateway exhibits frequent down events, increase this number to say 4 or 5 and see if it improves.
Socket Option Timeout
1m
IP Address
XXX.XXX.XXX.XXX
Enter in the Gateway IP address
Port
502
Usually 502 for Modbus, but check the Gateway manual.
Once the fields have been set, change Enabled (second slot from top) to true.
Socket Status should change to Opened, and Status (top slot) should change to {ok}. If not, fault finding is required. This may be:
Gateway is not connected or not ON, try pinging the IP address from a computer with network access. Try connecting to the gateway via a web browser (type the IP address in the browser address bar).
If the IP port is closed, the Socket Status will say something other than Opened. Confirm with IT that the port is opened on the IP address and allowed through the firewall. For example, “Is 150.229.84.130:502 open?”.
Configure the Devices
Once the gateway is configured and communicating, it is possible to configure Modbus devices connected to that gateway. These devices may include controllers, meters, anything with a Modbus interface.
Each device connected to the gateway will have a device address 1 to 247. For each device you will need to know the device make/model and the device address on the gateway, e.g. device 3 on the gateway at 150.229.11.XXX is a Schneider PM5350 power meter.
To make any sense of the readings, you will also need to know what it controls, and ideally what its name is, e.g. device 3 on gateway at 150.229.111.XXX meters the “BuildingName” PV array and has a designation EX-Y.
In the Palette window open the modbusTcp palette.
Drag ModbusTcpDevice into the relevant ModbusTcpGateway.
Note: For each device a ModbusTcpDevice will need to be configured. There will usually be a number of devices per gateway.
Rename the Device to reflect the device’s name and function, e.g. E801PvPbEastWest
Double-click on the device and right-click Views AX Property Sheet.
Figure 2 - Modbus TCP Device Configuration
Work your way down the slots and configure them as per below.
Table 2 - Modbus TCP Device Configuration
Field
Setting
Notes
Enabled
Set as false until device setup is complete.
In
Alarm Source Info
Leave as default
Device Address
X
Will need to be known, enter a integer between 1-247.
Modbus Config
Override Network
false
Float Byte Order
Order3210
If the readings from points are non-sensical for floats and/or long registers but are ok for integer and coils, these orders may need to be changed to 1032. It is the order in which bytes are combined from multiple registers to form a single float or long integer.
Long Byte Order
Order3210
Use Force Multiple Coil
false
Specifies whether to use function code 15 (Force Multiple Coils) instead of function code 05 (Force Single Coil) when writing to coils. The default is false, where function code 05 (Force Single Coil) is used.
Use Preset Multiple Register
false
Specifies whether to use function code 16 (Preset Multiple Registers) instead of function code 06 (Preset Single Register) when writing to registers. The default is False, where function code 06 (Preset Single Register) is used.
Ping Address
Hex 0
Generally default values will work ok.
If problems arise, refer to “About Modbus client devices” in the Niagara Help files.
Ping Address Data Type
Integer Type
Ping Address Reg Type
Holding
Poll frequency
Use normal
If there is a lot of network traffic or routine ping failures, change to slow.
Input Register Base Address
Hex 0
Generally default values will work ok.
If problems arise, refer to “About Modbus client devices” in the Niagara Help files.
Holding Register Base Address
Hex 0
Coil Status Base Address
Hex 0
Input Status Base Address
Hex 0
Device Poll Config
Leave as default (empty)
Used for configuring device level polling for registers. Refer “About Modbus client devices” in the Niagara Help files if required.
Once the fields have been set, change Enabled (second slot from top) to true.
The Status slot for the device (not the gateway) should change to {ok}. If it does not, check:
the Health slots to see whether the device is down and Last Fail Cause.
The device number is correct.
Modbus RTU and Modbus ASCII
The process for configuring Modbus RTU and Modbus ASCII networks are similar, but networks need to be configured for one or the other. You can’t place Modbus ASCII devices in a Modbus RTU network or vice versa. Modbus RTU uses time gaps between messages, Modbus ASCII uses ASCII characters at the start and end of messages. From here on we’ll refer to the network as Modbus RTU, but note the instructions will generally apply to Modbus ASCII as well.
Modbus RTU communications will be via the JACE serial port (RS485-A or RS485-B). Devices will be hardwired to the Jace in a daisy chain manner. Up to 31 slave devices can be installed in a string, more if repeaters are used. The JACE is the master and the devices are slaves.
The JACE may support multiple Modbus RTU networks.
Configuration of the network is outside the scope of this document and likely to be undertaken by a BMS contractor. In summary it will require
All devices hardwired to together in daisy chain configuration, with the JACE at the start of the string.
Each device powered up and configured (as per its manual) with its unique string address (1, 2, 3, 4, 5 etc) and baud rate set.
JACE installed at the start of the string with power supply and string connected to RS485-A or RS485-B.
Configure the ModbusAsyncNetwork
In the Palette window open the modbusAsync palette.
Drag ModbusTcpNetwork into Station: Config: Drivers
NOTE: Unlike BACnet, multiple Modbus devices can be configured in one JACE.
Rename the Network according to your need. For example, ModbusAsyncNetworkBranch9.
Double-click on the Network and right-click Views AX Property Sheet.
Figure 3 - Modbus Async Network Configuration
Table 3 - Modbus Async Network Configuration
Field
Setting
Notes
Enabled
Set as false until gateway setup is complete.
In
Alarm Source Info
Leave as default
Monitor
Ping Enabled
True
Ping frequency
5m
Alarm on Failure
Set to False
This will prevent the alarm console filling up with hundreds of ping failure/ping success alerts.
Startup Alarm Delay
Leave as 5m
Tuning policy
Min Write Time
Leave as default
Max Write Time
Leave as default
Write on start
Set to false
This will prevent erroneous commands being sent if the controller has been offline.
Write on up
Set to false
Write on enabled
Set to false
Stale Time
Leave as default
Poll Scheduler
Poll Enabled
Fast Rate
Leave as default (1s)
Adjust these if required. Faster polling provides more frequent data, but increases read failure rates.
Normal Rate
Leave as default (5s)
Slow Rate
Leave as default (30m)
Retry Count
2
Response Timeout
2s
Float Byte Order
Order3210
These are the global values, you can configure individual devices differently if required. If there are reading issues from the registers, refer to the gateway manual. It may need to be changed to 1032, but try changing the device first and see whether this resolves the issue.
Long Byte Order
Order3210
Use Preset Multiple Register
False
If there are reading issues from the registers, refer to the gateway manual. It may need to be changed to true.
Use Force Multiple Coil
false
Max Fails Until Device Down
2
If the gateway exhibits frequent down events, increase this number to say 4 or 5 and see if it improves.
Inter Message Delay
Leave as default
Serial Port Config
Port Name
Set these to suit the network. Refer to Niagara Help and the slave device manuals.
Baud Rate
Data Bits
Stop Bits
Parity
Flow Control Mode
Modbus Data Mode
Rtu or Ascii
Sniffer Mode
false
Refer Niagara Help
Rtu Sniffer Mode Buffer Size
8
Once the fields have been set, Change Enabled (second slot from top) to true.
Configure the Devices
Once the gateway is configured and communicating, it is possible to configure Modbus devices connected to that gateway. These devices may include controllers, meters, anything with a Modbus interface.
Each device connected to the gateway will have a device address 1 to 247. For each device you will need to know the device make/model and the device address on the network.
To make any sense of the readings, you will also need to know what it controls, and ideally what its name is, e.g. device 3 on Branch 9 network meters the “BuildingName” PV array and has a designation EX-Y.
In the Palette window open the modbusAsync palette.
Drag ModbusAsyncDevice into the relevant ModbusAsyncNetwork
NOTE: For each device a ModbusAsyncDevice will need to be configured. There will usually be a number of devices per network.
Rename the device to reflect the device’s name and function, e.g. E801PvPbEastWest
Double-click on the device and right-click Views AX Property Sheet.
Figure 4 - Modbus Async Device Configuration
Table 4 - Modbus Async Device Configuration
Field
Setting
Notes
Enabled
Set as false until device setup is complete.
In
Alarm Source Info
Leave as default
Device Address
X
Will need to be known, enter a integer between 1-247.
Modbus Config
Override Network
false
Float Byte Order
Order3210
If the readings from points are non-sensical for floats and/or long registers but are ok for integer and coils, these orders may need to be changed to 1032. It is the order in which bytes are combined from multiple registers to form a single float or long integer.
Long Byte Order
Order3210
Use Force Multiple Coil
false
Specifies whether to use function code 15 (Force Multiple Coils) instead of function code 05 (Force Single Coil) when writing to coils. The default is false, where function code 05 (Force Single Coil) is used.
Use Preset Multiple Register
false
Specifies whether to use function code 16 (Preset Multiple Registers) instead of function code 06 (Preset Single Register) when writing to registers. The default is False, where function code 06 (Preset Single Register) is used.
Ping Address
Hex 0
Generally default values will work ok.
If problems arise, refer to “About Modbus client devices” in the Niagara Help files.
Ping Address Data Type
Integer Type
Ping Address Reg Type
Holding
Poll frequency
Use normal
If there is a lot of network traffic or routine ping failures, change to slow.
Input Register Base Address
Hex 0
Generally default values will work ok.
If problems arise, refer to “About Modbus client devices” in the Niagara Help files.
Holding Register Base Address
Hex 0
Coil Status Base Address
Hex 0
Input Status Base Address
Hex 0
Device Poll Config
Leave as default (empty)
Used for configuring device level polling for registers. Refer “About Modbus client devices” in the Niagara Help files if required.
Create New Point Grouping Folder
Open the Modbus palette and drag a ModbusClientPointFolder into the Points extension on the device (Station: Config: Drivers: “Modbus Network”: “Modbus Device”: Points). Rename the folder to reflect the Device name. This folder name is used in generating the MQTT JSON packet and is uploaded as the point’s parent folder, along with the point name. This folder is the means by which the device name is uploaded to Senaps.
Important: If this folder is not created, and the points are not located within this folder, the MQTT JSON packet will be uploaded with parent equipment as “Points”. Where there are multiple devices with the same points (e.g. power meters) all these points will be uploaded with the same point name (e.g. RealPower) and parent folder name (Points); and make identifying the actual source device difficult.
When you create the Modbus points, they will be located within the renamed ModbusClientPointFolder and the file structure should look like this (point grouping folders are in bold):
Config
Drivers
ModbusTcpGateway (renamed)
ModbusTcpDevice1 (renamed)
Alarm Source Info
Device Poll Config
Points
ModbusClientPointFolder (renamed)
ModbusPoint1
ModbusPoint2
ModbusPoint3 etc
ModbusTcpDevice2 (renamed)
Alarm Source Info
Device Poll Config
Points
ModbusClientPointFolder (renamed)
ModbusPoint1
ModbusPoint2 etc
ModbusAsyncNetwork (renamed)
ModbusAsyncDevice (renamed)
Alarm Source Info
Device Poll Config
Points
ModbusClientPointFolder (renamed)
ModbusPoint1
ModbusPoint2 etc
Figure 5 - Points folders (in bold)
Configure the Points
Once the gateway and device are configured and communicating, it is possible to configure the Modbus points.
VERY IMPORTANT NOTE: Considerable angst and pain can be (somewhat) avoided if you have the following pre-prepared:
Confirmed make and model of the Modbus device.
The correct Modbus register map including register addresses, and register data types.
Instructions on re-combining multi byte registers. These will typically require reading 3 or more registers and performing multiplication or addition on the registers to arrive at a final reading. This is common for energy meter Wh counts.
For DCH onboarding, only reading of point values is required. However, if DCH algorithms and applications are to be used for control purposes, some registers will need to be written to as well.
A Modbus register map will look something like the screenshots below. If you are fortunate, instructions for reading different data types will also be included in the document.
It is recommended to start with a register that will have a known integer value, such as Baud Rate or voltage, or Model Number.
From the modbusTcp palette drag the appropriate point type from the Client Points folder. These points incorporate the Modbus Client Extensions required to configure the points.
Table 5 - Modbus Point Types
ModbusClientBooleanPoint
For reading Boolean points (coils) as either true/false, 0/1
ModbusClientBooleanWritable
For writing 1/0 to a Boolean register on the device
ModbusClientEnumBitsPoint
For reading enumerated registers where it is convenient to change the integer to a word, e.g.
0 – stop
1 – standby
2 – run
3 - fault
ModbusClientEnumBitsWritable
For writing an enumerated value to a register.
ModbusClientNumericPoint
For reading integers (signed, unsigned, long) and floats.
ModbusClientNumericWritable
For writing integers (signed, unsigned, long) and floats.
ModbusClientNumericBitsPoint
For reading individual bits from a register. Refer to the Niagara help.
ModbusClientNumericBitsWritable
For writing individual bits to a register. Refer to the Niagara help.
ModbusClientRegisterBitPoint
For reading one individual bit from a register. Refer to the Niagara help.
ModbusClientRegisterBitWritable
For writing one individual bit to a register. Refer to the Niagara help.
ModbusClientStringPoint
For reading ascii formatted strings from registers. The starting register and number of registers the string occupies are both required.
Note the corresponding writable for this point does not exist.
For each point, configure the Modbus Client Proxy Ext for the point. These extensions will be slightly different for each point type, but will have the following fields:
Table 6 - Modbus Client Proxy Ext Configuration
Slot
Value
Notes
Status
{ok}
Should display {ok} when everything if communicating.
Fault Cause
Should be blank when everything is communicating.
Enabled
true
Device Facets
Configure as required.
Ensure units are correct eg. Wh vs kWh
Conversion
Configure as required
Use for scaling, e.g. convert integer 2512 to 251.2Volts
Tuning Policy Name
Leave as default
Unless required leave as default.
Read Value
The value being read from the register.
Write Value
The value being written to the register by the Jace.
Poll Frequency
Leave as default
Configure if required
Data Address
Modbus
Decimal
Hex
43060
3059
0BF3
Examples are shown for addressing the same register.
Refer data addressing section below.
Absolute Address
Data Source
Reg Type
Holding or Input
Unless writing to the register, set as Holding. If writing to an input register, change this to input register, refer to the Niagara Help.
Number Registers
1 - max
Number of registers to be read and combined. For example a string such as the model of meter may be written across 20 registers.
Out
The out slot of the point (may take time to update or require refresh).
Figure 6 - Example Modbus Tcp Proxy Extension Configuration
Modbus Data Addresses
Modbus data address is a 5-digit decimal number. The first digit defines the register type:
0 – Coils (binary holding registers), 0nnn
1 – Inputs (binary inputs), 1nnnn
3 – Input registers, 3nnnn
4 – Holding registers, 4nnnn
Modbus addresses commonly start at 1, e.g. 40001. Decimal address are 4 digit addresses that usually start at 0. Because of this the decimal address is usually 1 less than the Modbus address.
Hex addresses are a 4-digit hexadecimal address. They are the hexadecimal conversion of the decimal address. They are also commonly 1 less than the Modbus address.
The Modbus map may provide addresses in Modbus, Decimal or Hex format. Sometimes some trial and error is required, and it is best to start with registers where you know the expected contents.
Examples are below. Each row contains Modbus, Decimal and Hex addresses for the same register.
Modbus
Decimal
Hex
00020
0019 (holding)
0013 (holding)
30016
0015 (input)
000F (input)
41064
1063 (holding)
0427 (holding)
Modbus Point Examples
Some examples of Modbus points and register maps are provided below.
Figure 7 - Example Modbus Register Map
Figure 8- Configured Modbus Real Power Meter Point
Here’s the corresponding point in the Schneider PM5350 Modbus Register map.
Figure 9 - Corresponding register as listed in the Modbus Register Map
Figure 10 - Example Enumerated Point Configuration
Figure 11 - Example Facets for the Enumerated Point
Combining Registers Via Calculation
The formula should be provided by the device manufacturer. This will define the multipliers for each register and in which order the registers are numbered.
As an example, Schneider meters use INT64 and Mod10 methods.
With Mod10 (PM800 meters), read in four integer registers, starting at R1 and ending in R4. Multiply by 10000 to various powers to get a (up to) 16 digit number representing the kWh cumulative count.
Table 7 - Example Schneider PM800 Cumulative Energy Calculation
Modbus Register
Integer Value
Multiplier
Partial Sum
R1
ImportEnergyRegister1
47000
8131
1.00E+00
8131
R2
ImportEnergyRegister2
47001
9300
1.00E+04
93000000
R3
ImportEnergyRegister3
47002
45
1.00E+08
4500000000
R4
ImportEnergyRegister4
47003
0
1.00E+12
0
Cumulative Energy
4593008131
kWh
With INT64 (PM5350 meters) read in four registers starting in R4 and ending in R1. Multiply by 2 to various powers to get up to a 16-digit number representing the Wh count. Note how the method of multiplication, the energy units, and order of registers is different to the PM800, so be cautious.
Table 8 - Example Schneider PM5350 Cumulative Energy Calculation
Into Load
Modbus Register
Integer Value
Multiplier
Partial Sum
R1
EnergyRegister1
43207
33405
1
33405
R2
EnergyRegister2
43206
5414
65536
354811904
R3
EnergyRegister3
43205
0
4294967296
0
R4
EnergyRegister4
43204
0
281474976710656
0
Cumulative Energy
354845309
Wh
The smallest multiplier will be for the register that changes the most often. If the largest multiplier will be for the register that changes the least. The upper registers with the largest multipliers will frequently have a value of 0.
To implement the calculation in the JACE, create a folder within the meter Points Grouping Folder (at the same level as the meter points) called EnergyCalc or similar.
Double-click this folder to open it in Wire Sheet view, or right-click and select Views Wire Sheet.
Open the KitControl Palette and expand the Math folder. Drag function blocks into the Wire Sheet as required. This will typically be Multiply and Add block. Generally, energy consumption units should be in kWh. If the meter energy units are in another unit such as Wh, open the Conversion folder in the KitControl palette and drag in a NumericUnitConverter block inside the Conversion folder to convert the units to kWh (note to link the In slot on this block prior to configuring the facets, otherwise the facet changes won’t save.
Create a new Numeric Writable point in the meter Point Grouping Folder (at the same level as the meter points) called RealEnergyImport or similar. Link the kWh calculated cumulative energy count from the EnergyCalc folder and link it into slot 16 of this RealEnergyImport point. This point will be uploaded as part of the Senaps MQTT communications.
Figure 12 - Example Calculation for Cumulative Electrical Energy for Schneider PM5350 meters.
Figure 13 - Example Calculation for Cumulative Import and Export Energy Schneider PM810 meters.
Last updated