EasyManua.ls Logo

Nidec Unidrive M700 - Page 156

Nidec Unidrive M700
216 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
156 SI-Ethernet User Guide
Issue: 3
Base address + 6 (MSW)
The most significant word of the parameter value is converted to a signed 16-bit value stored in a
32-bit variable by bitwise shifting it 16 places right and bitwise ANDing the result with the
hexadecimal value 0x00007FFF, then subtracting the decimal value 32768 if the most significant
bit is set to 1.
Examples:
As an example, the following code may be used in the user program:
// Writing
// Calculate the value to write LSW
LSW% = Value% & 0x00007FFF
// Handle the casting from 32bit variable to 16bit parameter
IF Value%.15 = True% THEN
// Subtract 32768
LSW% = LSW% - 32768
ENDIF
// Write it to the correct parameter
Address% = BaseAddress% + 5
#Address% = LSW%
//Calculate the value to write MSW
MSW% = (Value% >> 16) & 0x00007FFF
// Handle the casting from 32bit variable to 16bit parameter
IF Value%.31 = True% THEN
// Subtract 32768
MSW% = MSW% - 32768
ENDIF
// Write it to the correct parameter
Address% = BaseAddress% + 6
#Address% = ValueMSW%
Value to write
MSW LSW
Decimal Hex Decimal Hex
3515 0 00000000 3515 00000DBB
123456 1 00000001 -7616 FFFFE240
-123456 -2 FFFFFFFE 7616 00001DC0
-678900 -11 FFFFFFF5 -23540 FFFFA40C
BaseAddress% is the parameter specified in S.02.036
NOTE

Table of Contents

Other manuals for Nidec Unidrive M700

Related product manuals