You are on page 1of 5

30/3/24, 22:05 SSL and Modbus functions - Schneider Electric Community

3
Go to mySchneider  Translate to: Please select 

Help 

Building Automation Knowledge Base


Schneider Electric Building Automation Knowledge Base is a self-service resource to answer all your questions about EcoStruxure Building suite,
Andover Continuum, Satchwell, TAC…

Knowledge base 

Search 

Schneider Electric Community  Knowledge Center  Building Automation Knowledge Base  SSL and Modbus functions 

 Back to Building Automation Knowledge Base 

 0 Likes  2832 
Trying to translate this page to your language?

SSL and Modbus functions   


Posted by: Product_Support ‎2018-09-11 CraigEl ‎2022-08-10

Issue
Modbus device in hand does not have a pre-configured widget in the device list of Building Expert. A script is required to communicate
with the device
Product Line
EcoStruxure Building Expert
Environment
SmartStruxure Lite Multi-Purpose Manager
Any modbus device

Cause
Pre-configured widget not available in the device list of Building Expert
Resolution
The MPM can only be a Modbus Master; meaning it can request information from other slave modbus devices, or write to them. Feedback

Terminals A and B on the MPM correspond to modbus terminals (Serial +) and (Serial -) respectively.

When using a script to communicate with modbus devices, the "Enable" box in the ModBus configuration object (MOD1) must be disabled
to allow the MPM to communicate with the devices using a script.

https://community.se.com/t5/Building-Automation-Knowledge/SSL-and-Modbus-functions/ta-p/1228 1/5
30/3/24, 22:05 SSL and Modbus functions - Schneider Electric Community

The modbus port should then be closed (in case it was left open) and re-opened using the following functions
********************************************************
@@@ Lua.modbus.close (Description and example here)
********************************************************
@@@ Lua.modbus.open (Description and example here)

********************************************************

The following are the standard modbus functions and their corresponding Lua functions used in the MPM
Modbus
Lua Function in MPM
Function Code
Function Code
modbus.coil_read
01
Function Code
modbus.di_read
02
Function Code modbus.hr_read (16-
03 bit)
Function Code
modbus.in_read
04
Function Code
N/A
05
Function Code
modbus.coil_write
15
Function Code
modbus.hr_write
06

The following are the 8 different modbus functions that can be used to read/write to registers from/to modbus devices Feedback

********************************************************
@@@ Lua.modbus.coil_read (Description and example here)
This function is equivalent to : [Function Code 01 (01 HEX)]

********************************************************
@@@ Lua.modbus.coil_write (Description and example here)
This function is equivalent to : [Function Code 15 (0F HEX)]

********************************************************
@@@ Lua.modbus.di_read (Description and example here)

https://community.se.com/t5/Building-Automation-Knowledge/SSL-and-Modbus-functions/ta-p/1228 2/5
30/3/24, 22:05 SSL and Modbus functions - Schneider Electric Community

This function is equivalent to : [Function Code 02 (02 HEX)]

********************************************************
@@@ Lua.modbus.hr_read (Description and example here)
This function is equivalent to : [Function Code 03 (03 HEX)]

********************************************************
@@@ Lua.modbus.hr_write (Description and example here)
This function is equivalent to : [Function Code 06 (06 HEX)]

********************************************************
@@@ Lua.modbus.in_read (Description and example here)
This function is equivalent to : [Function Code 04 (04 HEX)]
********************************************************
@@@ Lua.modbus.fp_read (Description and example here)

********************************************************
@@@ Lua.modbus.fp_write (Description and example here)
********************************************************
To read a floating-point (32-bit) value, the fp_read() function can be used. (Download script)
To read an unsigned long (32-bit) value the hr_read() function can be used, however, some data manipulation is required (Download script)
To read a floating-point (64-bit) value, the hr_read() function can be used. (Download script)

Modbus errors can be found here


Labels

EcoStruxure Building Expert

Attachments

Modbus_Close.txt Modbus_Coil_Read.txt Modbus_DI_Read.txt Modbus_Coil_Write.txt

Modbus_FP_Read.txt Modbus_UFloat32_Read.txt Modbus_Open.txt Modbus_Errors.txt

Modbus_FP_Write.txt Modbus_IN_Read.txt Modbus_FloatingPoint64_read.txt Modbus_HR_Read.txt

Modbus_HR_Write.txt

Tags

Find more articles tagged with: 17871

 Add tags

Was this article helpful? Yes No

100% helpful (1/1)


Feedback

Related Forums

Field Devices Forum

Contributors

DavidFisher 

https://community.se.com/t5/Building-Automation-Knowledge/SSL-and-Modbus-functions/ta-p/1228 3/5
30/3/24, 22:05 SSL and Modbus functions - Schneider Electric Community

CraigEl

SaidSawan

Product_Support

Recommended Posts

Function Block Program Macro Library 

 Uploading Private SSL Certificates 

Modbus Simulator  

Device Administrator SSL Certificate Validation Failed  

Installing an SSL Certificate from an External CA  

Invite a Colleague
Found this content useful? Share it with a Colleague!

Invite a Colleague

Feedback

    

FORUMS 

KNOWLEDGE CENTER

EVENTS & WEBINARS


https://community.se.com/t5/Building-Automation-Knowledge/SSL-and-Modbus-functions/ta-p/1228 4/5
30/3/24, 22:05 SSL and Modbus functions - Schneider Electric Community

IDEAS

BLOGS

GET STARTED 

Terms & Conditions | Privacy Notice | Change your Cookie Settings

© 2024 Schneider Electric, Inc

Feedback

https://community.se.com/t5/Building-Automation-Knowledge/SSL-and-Modbus-functions/ta-p/1228 5/5

You might also like