![background image](http://html.mh-extra.com/html/nidec/unidrive-m600/unidrive-m600_user-manual_1687782155.webp)
SI-Ethernet User Guide
155
Issue: 3
Sa
fe
In
Me
ch
E
Get
ting s
ta
P
K
an
PC T
Sec
Di
G
Ind
ex
As an example, the following code may be used in the user program:
// Set the IP address
WWWXXX% = ((www% << 8) & 0x0000FF00) | (xxx% & 0x000000FF)
YYYZZZ% = ((yyy% << 8) & 0x0000FF00) | (zzz% & 0x000000FF)
// Handle the casting from 32bit variable to 16bit parameter
IF
WWWXXX% > 32767
THEN
// Subtract 65536
WWWXXX% = WWWXXX% - 65536
ENDIF
IF
YYYZZZ% > 32767
THEN
// Subtract 65536
YYYZZZ% = YYYZZZ% - 65536
ENDIF
7.4.2
Setting the destination slot and menu (Base a 3)
The destination slot and menu address is sent in the format SMM, where S is the slot number and
MM is the two digit menu number.
Examples
•
For the drive application menu 3, the value sent would be “20”.
•
For the SI-Applications Plus register 70 in slot 3, the value sent would be “370”.
7.4.3
Setting the destination parameter address (Base a 4)
The destination parameter address is sent in the format PPP, where PPP is the three digit
parameter number.
Examples
•
For parameter “021”, the value sent would be “21”.
•
For parameter “104”, the value sent would be “104”.
7.4.4
Setting the parameter value to write
The destination parameter value is sent in two signed 16-bit values, therefore it must be converted
into two signed 16-bit words.
Base a 5 (LSW)
The least significant word of the parameter value is converted to a signed 16-bit value stored in a
32-bit variable by bitwise ANDing it with the hexadecimal value 0x00007FFF and subtracting the
decimal value 32768 if the result was greater than the decimal value 32767.
Only menus numbers 0 to 99 are possible using this method.
NOTE