Difference between revisions of "Component: Modbus TCP Slave (Comms: System)"
From Flowcode Help
Jump to navigationJump to search| Line 60: | Line 60: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
| + | |||
| + | |||
| Line 65: | Line 67: | ||
==Macro reference== | ==Macro reference== | ||
| + | ===ReadHoldingRegister=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 83: | Line 86: | ||
| + | ===SetCoil=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 106: | Line 110: | ||
| + | ===SetDigitalInput=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 129: | Line 134: | ||
| + | ===SetSlaveAddress=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 147: | Line 153: | ||
| + | ===ReadCoils=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 170: | Line 177: | ||
| + | ===SetHoldingRegister=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 193: | Line 201: | ||
| + | ===ReadAnalogInput=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 211: | Line 220: | ||
| + | ===CheckForIncoming=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 224: | Line 234: | ||
| + | ===ReadDigitalInputs=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 247: | Line 258: | ||
| + | ===GetLastIncoming=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 265: | Line 277: | ||
| + | ===SetAnalogInput=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 288: | Line 301: | ||
| + | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Revision as of 11:51, 3 February 2023
| Author | Matrix Ltd. |
| Version | 2.1 |
| Category | Comms: System |
Contents
Modbus TCP Slave component
Modbus component for creating Modbus compatible slave hardware via Ethernet or WIFI. Ensure TCP/IP or WIFI component is initialised and connected to a network before calling the ModbusSlaveTCP component macros.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_ModbusSlaveTCP.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_ModbusSlaveTCP.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
ReadHoldingRegister
| ReadHoldingRegister | |
| Reads the value of a single holding register. | |
| Address | |
| Coil Address | |
| Return | |
SetCoil
| SetCoil | |
| Sets the state of a single digital coil. | |
| Address | |
| Coil Address | |
| State | |
| 0=off, 1=on | |
| Return | |
SetDigitalInput
| SetDigitalInput | |
| Sets the state of a single digital input. | |
| Address | |
| Coil Address | |
| State | |
| 0=off, 1=on | |
| Return | |
SetSlaveAddress
ReadCoils
SetHoldingRegister
| SetHoldingRegister | |
| Sets the state of a single holding register. | |
| Address | |
| Coil Address | |
| Value | |
| Analogue Value range 0 - 65535 | |
| Return | |
ReadAnalogInput
| ReadAnalogInput | |
| Reads the value of a single analogue input. | |
| Address | |
| Coil Address | |
| Return | |
CheckForIncoming
ReadDigitalInputs
GetLastIncoming
SetAnalogInput
| SetAnalogInput | |
| Sets the state of a single analogue input. | |
| Address | |
| Coil Address | |
| Value | |
| Analogue Value range 0 - 65535 | |
| Return | |
Initialise
| Initialise | |
| Starts up the UART to allow communications and initialises the states of the various Modbus Coils, Inputs and Registers to 0. | |
| Return | |