LinMot Motion Control Software
This guide is still very much a work in progress so it should be treated as such, feel free to add/correct info.
Parameters consist of a set of 16 single bit values. These together make a binary number, which can be translated to a decimal number (e.g. using this website)
Note: bit counting starts at 0, so bit 0 is the first bit, and bit 7 is the 8th bit etc.
128
= Motor Not Homed (only bit 7 is flipped)
0000000010000000
With the Control Word (16Bit) the main state machine of the drive can be accessed.
1111111
- All regular things on, and go to position on10111111
The following are frequently used ControlWord commands, that can be used with LinMot Drivers E1250 and C1250.
A good start-up sequence (in dec) is:
182 - 55 - 2239 - 63
bin: 0000 0000
hex: 0
dec: 0
bin: 0000 0001
hex: 1
dec: 1
bin: 0000 0100
hex: 4
dec: 4
bin: 1000 0100
hex: B6
dec: 182
bin: 0000 0101 / 0011 0111
hex: 37
dec: 55
bin: 0000 1101 / 0011 1111
hex: 3F
dec: 63
bin: 1000 1101 / 1011 1111
hex: BF
dec: 191
bin: 1000 1011 1111
hex: 8BF
dec: 2239
bin: 0111 1111
hex: 7F
dec: 127
256
sets the Master ID’s first bit (9th bit in total) to 1. Assigning a Master ID to the commands we are inputtingFrom the manual: “A new command will only be executed, if the value of the command count has changed. In the easiest way bit 0 can be toggled.”
In other words, we can flip between 256
and 257
to allow commands to be executed each update.
128
), though this should already be shown before even changing to 10
(if no other errors occured)This was some mockup code and can be improved a lot, but may be used as a basis for the next person working on this.
controlWord = [
"Switch On",
"Voltage Enable",
"Quick Stop",
"Enable Operation",
"Abort",
"Freeze",
"Go To Position",
"Error Acknowledge",
"Jog Move +",
"Jog Move -",
"Special Mode",
"Home",
"Clearance Check",
"Go To Initial Position",
"Reserved",
"Phase Search"
]
warnWord = [
"Motor Hot Sensor",
"Motor Short Time Overload I^2t",
"Motor Supply Voltage Low",
"Motor Supply Voltage High",
"Position Lag Always",
"Reserved",
"Drive Hot",
"Motor Not Homed",
"PTC Sensor 1 Hot",
"Reserved PTC 2",
"RR Hot Calculated",
"Reserved",
"Reserved",
"Reserved",
"Interface Warn Flag",
"Application Warn Flag"
]
statusWord = [
"Operation Enabled",
"Switch On Active",
"Enable Operation",
"Error",
"Voltage Enable",
"Quick Stop",
"Switch On Locked",
"Warning",
"Event Handler Active",
"Special Motion Active",
"In Target Position",
"Homed",
"Fatal Error",
"Motion Active",
"Range Indicator 1",
"Range Indicator 2"
]
wordsDict = {
"control": controlWord,
"warn": warnWord,
"status": statusWord
}
def printMeaning(decimalValue,wordType,onlyShowTrue=False):
print("Decoding {} for {}".format(decimalValue,wordType))
binVal=bin(decimalValue).split("b")[-1]
nZeros=16-len(binVal)
fullBinVal=nZeros*"0" + binVal
bits = fullBinVal[::-1] # reverse (so that bits[0] is the first bit)
print("Full 16-bit Binary Value: " + bits)
wordList = wordsDict[wordType]
for bitNum,bitVal in enumerate(bits):
if (onlyShowTrue and bool(int(bitVal))) or (not onlyShowTrue):
print("{}:{} = \t {}".format(bitNum,wordList[bitNum], bitVal).expandtabs(40))
#controlWord,warnWord,statusWord
printMeaning(128,"warn")
printMeaning(16567,"status",True)
#printMeaning(256,"status")