emModbusSlaveDebugSetup | Top Next

emModbusSlaveDebugSetup set up embedded Modbus Server or Debug/monitor Since R2019b Library: embeddedCreatorLib ( Dafulai Electronics) / embedded Modbus Slave & Debugger / emModbusSlaveDebugSetup Description This block sets up Modbus Server or Debug/Monitor parameters. Notes: You can add maximum 4 embedded Modbus servers if you don't use embedded Modbus client.. So you can add maximum 4 "emModbusSlaveDebugSetup" blocks if you don't use embedded Modbus client. And one of these blocks can be used debug/monitor purpose beside Modbus server function. When you use embedded Modbus client, Maximum 3 embedded Modbus servers can be used. Parameters Please double click this block to open parameters dialog below: We we have no make parameter "Enable Debug/Monitor by this hardware" to check on , the parameters dialog will be shown below: Let us explain parameters.
• | embedded target UART No: — In one embedded Micro-controller, there are many serial ports. This drop list parameter will tell target which serial port of Micro-controller will be used for this embedded server or debug/monitor. Different Modbus server or client cannot use the same serial ports.
• | embedded target Baud Rate — embedded serial port baud rate in unit bit/sec. Actually, actual baud rate is decided by embedded target IDE configuration software. Here just use it to decide time for Modbus RTU packet separation (3.5 characters)
• | embedded target modbus server ID: — It is Modbus Server ID or Server address. Valid Server ID is 1 to 247. If two Modbus Servers are not connected to the same Modbus network physically, the servers can use the same Server ID. Otherwise, you can not assign different Servers to the same Server ID.
• | PC Side USB/Bluetooth Serial Port Baud Rate — If you use this Modbus Server as debug/monitor (Parameter "Enable Debug/Monitor by this hardware" is checked on), this parameter will be visible. We will use "Modbus RTU/ASCII Dual Masters adaptor" from Dafulai Electronics Inc to debug/monitor embedded system in Simulink environment. You must use software "ConfigTool.exe" to configure "Modbus RTU/ASCII Dual Masters adaptor" firstly. Make sure PC Side baud rate is equal to this parameter, and Bus side baud rate is equal to parameter " embedded target Baud Rate ".
• | Force longer space — true will make my server response packet to be separated with master request packet much longer time (in standard Modbus RTU Protocol, it is 3.5 characters time). It will increase anti-noise ability. false will use standard 3.5 characters space time.
• | Holding Regs Qty — My server supports how many holding registers. Valid Range is 0 to 65536. 0 means we don't support holding register for this server.
• | Min Holding Reg address (1-based without 4x prefix) — In my server supported holding register range, it is minimum address my server supports.
• | Input Regs Qty — My server supports how many input registers. Valid Range is 0 to 65536. 0 means we don't support input register for this server.
• | Min Input Reg address (1-based without 3x prefix) — In my server supported input register range, it is minimum address my server supports.
• | Coil Regs Qty — My server supports how many coil registers. Valid Range is 0 to 65536. 0 means we don't support coil register for this server.
• | Min Coil Reg address (1-based without 0x prefix) — In my server supported coil register range, it is minimum address my server supports.
• | Discrete Regs Qty — My server supports how many discrete registers. Valid Range is 0 to 65536. 0 means we don't support discrete register for this server.
• | Min Discrete Reg address (1-based without 1x prefix) — In my server supported discrete register range, it is minimum address my server supports.
• | Enable Debug/Monitor by this hardware — true means that we will use "Modbus RTU/ASCII Dual Masters adaptor" from Dafulai Electronics Inc to debug/monitor embedded system in Simulink environment. false means that we don't use this server for Debug/Monitor purpose. Note: If it is true, you can still use this server as general Modbus Server function beside debug/monitor function.
• | Break points MAX Qty — If you use this Modbus Server as debug/monitor (Parameter "Enable Debug/Monitor by this hardware" is checked on), this parameter will be visible. It sets up maximum "break points" QTY. Valid Range is 0 to 100
• | Max words QTY by all Probe variables use — If you use this Modbus Server as debug/monitor (Parameter "Enable Debug/Monitor by this hardware" is checked on), this parameter will be visible. It sets up maximum Qty in unit word by Probe blocks. Probe is used for watching signals value of simulink block for debug/monitor. Valid Range is 0 to 65355
• | Max Qty for embedded wait block (emWait) — If you use this Modbus Server as debug/monitor (Parameter "Enable Debug/Monitor by this hardware" is checked on), this parameter will be visible. It is Maximum QTY of block "emWait" which is used for delay some time (non-blocking function). You can view help of "emWait" to know details. Valid Range is 0 to 100
• | PC Com Port for Debug or Monitor — If you use this Modbus Server as debug/monitor (Parameter "Enable Debug/Monitor by this hardware" is checked on), this parameter will be visible. This drop list will tell system which COM Port will be used by "Modbus RTU/ASCII Dual Masters adaptor" for debug/monitor purpose.
• | How to specify Tx Enable Port — In RS485/422 interface, generally, you need one GPIO output to control Tx Enable. You can choose one of 2 ways to specify this GPIO outport. "By physical port name and bit number" will specify which GPIO Port Name (drop list) and which Port bit number (drop list) used for "Tx Enable". "By C language writing variable/macro name" will directly specify C language's GPIO output variable or macro for "Tx Enable". If your hardware don't use "Tx Enable", you just give this parameter empty string "".
• | Port Name — It is for "Tx Enable". When you use "By physical port name and bit number", it specify GPIO Port Name (drop list).
• | Port Bit number — It is for "Tx Enable". When you use "By physical port name and bit number", it specify which Port bit number (drop list).
• | Target RS485 Tx Enable C language operation Name — It is for "Tx Enable". When you use "By C language writing variable/macro name", it will directly specify C language's GPIO output variable or macro for "Tx Enable". If your hardware don't use "Tx Enable", you just give this parameter empty string "".
• | Target RS485 Tx Enable polarity is High — It is for "Tx Enable". True means GPIO port Logic High will enable "RS485/RS422" transmit. False means GPIO port Logic Low will enable "RS485/RS422" transmit.
Ports Input None Outport None Examples