Command Group: Communication | Access: | Network interfaces: | |
| RW | CANopen | |
| | MODbus | |
NS - Network Setting | | PROFIbus | |
Synopsis: |
| Command | Response |
Get | NS | NS:<Value> |
Set | NS <Value> | OK (or ERR) |
|
Valid for | Min. value | Max. value |
151.181 |
|
|
152.181 |
|
|
162.181 |
|
|
179.181 |
|
|
181.181 |
|
|
64.181 |
|
|
64.184 |
|
|
|
NS Network Setting for H&B Devices.
The NS command can display or set any implemented networking parameter of the Device.
Since the IO types have different parameters the parameter fields are also different.
Note that when writing to any writeable parameter the new value must be stored using the WP command.
Any previous value will be lost and the changes made takes effect on next Device restart.
All devices uses 2 or 3 parameters:
First parameter is the Interface (P0). 0=SerialDevice, 1=CanDevice, 2=EthDevice, 3=ProfiDevice. - (Omitted for LDM64 before V=3.00).
Second Parameter is the parameter number (P1..P7), see the table below. On LDB_xx the parameters P1 and P2 are exchanged.
Third parameter is the new parameter value, if given. Else the value are displayed.
Reading P0 returns the device ID
Generally defined parameters:
P\T |
SerialDevice |
CanDevice |
EthDevice |
ProfiDevice |
P0 |
0 |
1 |
2 |
3 |
P1 |
Serial Speed |
Can Address |
|
|
P2 |
Serial Address |
Can Speed |
IPv4 Address |
Profibus Address |
P3 |
Serial Settings |
Heartbeat |
mac[47...32] |
|
P4 |
Transmit Delay |
Nodeguard |
mac[31...00] |
|
P5 |
|
Lifetime |
|
|
P6 |
|
TPDO1 Decimator |
|
|
P7 |
|
|
|
|
|
|
Defined parameters LDM64 (Before IV=‘3.00’):
P\T |
CanDevice |
P0 |
(1) Omitted on LDM64 |
P1 |
Can Speed |
P2 |
Can Address |
P3 |
Heartbeat |
P4 |
Nodeguard |
P5 |
Lifetime |
P6 |
TPDO1 Decimator |
P7 |
|
|
|
Accessing the parameters via Serial protocol:
To Show the parameter value: NS [Interface][Param]
To set a new parameter value: NS [Interface][Param] [New Value]
- Interface is of the P0 values 0..3.
- Param is the parameter nr. 0..7.
Example:
NS 0 0 <cr> |
- Shows the ID of the Device. |
NS 1 1 <cr> |
- Shows the CAN Speed. |
NS 1 2 <cr> |
- Shows the CAN network address. |
NS 1 2 3 <cr> |
- Set the CAN network address to 3. |
NS 1 4 1200 <cr> |
- Sets the CAN Nodeguard time to 1200. |
Accessing the parameters via Modbus protocol:
Register 2072h selects the interface 0..3 (on WCN122 the IO board)
Register 2073h selects the parameter 0..15.
Register 207Ah (2-register read or write) provides access to the parameter value selected by 2072h and 2073h.
Can Device parameters
- P0 is the Board type 131.
- P1 is the CanOpen Address 1..127
- P2 is the CAN speed in Kbit: 10=10KBit, 50=50Kbit, 125=125Kbit, 250=250Kbit, 500=500Kbit, 800=800Kbit, 1000=1Mbit.
- P3 is the Heartbeat time in milliseconds, if Heartbeat is used. If this field is 0 (zero) the Heartbeat is disabled.
- P4 is the Nodeguard time in milliseconds, if Nodeguard is used. When Heartbeat is disabled Nodeguard is used.
- P5 is the Nodeguard life time factor.
- P6 is TPDO1 decimator (send every N TPDO1). E.g.: 0=off, 1= ALL TPDO1, 2= every 2nd, 3= every 3rd, etc..
Ethernet Device parameters
- P0 is the Board type 132.
- P1 is unused, returns 0 (zero).
- P2 is the IPv4 Address xx.xx.xx.xx
- P3 is the upper 16 bit of the MAC address (00000050).
- P4 is the lower 32 bit of the MAC address.(C2705xxx)
PROFIBUS Device parameters
- P0 is the Board type 133.
- P1 is unused, returns 0 (zero).
- P2 is the PROFIBUS Address 1..127
Serial Device parameters
- P0 is the Board type 134.
- P1 is the Serial speed: 0=9600, 1=19200, 2=38400, 3=57600, 4=115200.
- P2 is the Serial Address 1..255
- P3 is the special Serial settings, see below.
- P4 is the transmit delay im milliseconds when using RS485 mode.
- bit 0 controls parity: 1=enabled.
- bit 1 controls parity type: 0=odd, 1=even.
- bit 6 is the address use: 0=ignore address, 1=address must match, see OP command
- bit 7 controls the duplex mode: 0=RS422 (4-wire), 1=RS485 (2-wire).
- bit 15..8 is the protocol used: 0= plain ASCII, 1= ModbusRTU.