background image

DMX Implementation

Moog Animatics Class 5 SmartMotor™ DMX Guide, Rev. C

Page 23 of 46

DMX Implementation

The SmartMotor has the ability to accept DMX512 protocol through the RS-485 port. Flexibility
is maintained by allowing the user to assign and accept multiple slots of incoming DMX
protocol — the starting slot and number of slots may be defined by the user.

DMX data packets are unsigned 8-bit integer data. As a result, and to conform to only positive
integer values, incoming slots of 8-bit data are stored into 16-bit signed array variables in
SmartMotor memory.

SmartMotors have predefined 16-bit array data variables consisting of aw[0] through aw
[101]. Therefore, the SmartMotor is limited to 102 DMX channels. The "aw" stands for "array
word" and is an indexed 16-bit signed integer value. If a slot is assigned to an aw[ ] array
variable, the value returned will be between 0 and 255. This assures proper sign convention
for all values. It also allows for easier addition and bit shifting to optimize incoming data.

NOTE:

The SmartMotor is limited to 102 DMX channels.

The user program must read incoming DMX data in the aw[ ] registers and perform all actions
from that data, including motion and/or digital outputs.

For example, if you want to control the position of a theater light, you would:

1. Select an unused DMX controller channel,

2. Program the base address in the SmartMotor aligned with that particular channel,

3. Write a program that reads the corresponding array variable in the SmartMotor,

4. Assign corresponding parameters in the motor, including position, velocity, acceleration

and torque, call out a specific subroutine, and more.

By using the SmartMotor, the entire motion control system requires less cabling and becomes
more compact because no control cabinet is needed. Further, additional axes can be added as
needed.

Data Storage and Usage

Address information for the DMX protocol can be stored in one of the following ways:

l

It can be "hard coded" into the program, or

l

The VST/VLD commands can be used to store/retrieve this information
to/from the desired SmartMotor memory location.

It is up to the system programmer to select the method that works best for the application.

NOTE:

Technically, there is no "address" for a DMX slave device. The slave device

sees all (possibly 512 bytes) of the data and decides which part it wants to use.

Summary of Contents for Class 5 SmartMotor

Page 1: ...For the mobile version of this guide see animatics com docs guides html c5_dmx...

Page 2: ...ics The programs and code samples in this manual are provided for example purposes only It is the user s responsibility to decide if a particular code sample or program applies to the application bein...

Page 3: ...ation Resources 11 Additional Documents 13 Related Guides 13 Other Documents 13 Additional Resources 14 DMX Resources 14 Connections Wiring and Status LEDs 15 Connectors and Pinouts 16 D Style Motors...

Page 4: ...els 27 Special Range Checking 28 Open DMX Channel 28 Close DMX Channel 28 Example Programs 29 Home Against a Hard Stop Example 30 Position Mode Control Example 32 DMX Five Channel Example 35 DMX Packe...

Page 5: ...find related documents and additional resources Purpose 6 Combitronic Technology 6 DMX Overview 8 Safety Information 9 Safety Symbols 9 Other Safety Considerations 9 Motor Sizing 9 Environmental Consi...

Page 6: ...tand the Engineering Commission of United States Institute for Theatre Technology USITT DMX512 A standard Therefore this manual is not a tutorial on that standard or the DMX protocol Instead it should...

Page 7: ...the market that can talk to each other on a side bus while being a slave to the DMX host controller l Compute or synchronize motion between motors within the same Combitronic network For example DMX...

Page 8: ...sion errors would not cause harm to personnel or equipment WARNING DMX networks must not be used in applications where failure due to transmission errors would cause harm to personnel or equipment DMX...

Page 9: ...form a thorough Risk Assessment and to ensure that the machine system and its safeguards comply with the safety standards specified by the governing authority for example ISO OSHA UL etc for the local...

Page 10: ...reach into any identified danger zones l Position the control panel so that it is outside the barrier area but located for an unrestricted view of the moving mechanism The control panel must include...

Page 11: ...pany safety practices l The equipment is maintained as described in the documentation and training supplied by the machine system designer Additional Equipment and Considerations The Risk Assessment a...

Page 12: ...standards information can be found at http ulstandards ul com standards catalog ISO standards information can be found at http www iso org iso home standards htm EU standards information can be found...

Page 13: ...evelopers guide Other Documents l SmartMotor System Best Practices http www animatics com system best practices application note l SmartMotor Product Certificate of Conformance http www animatics com...

Page 14: ...l Product support Downloads How To videos Forums Knowledge Base and FAQs http www animatics com support html l Sales and distributor information http www animatics com sales offices html l Applicatio...

Page 15: ...he SmartMotor connectors a multidrop cable diagram and a description of the SmartMotor status LEDs Connectors and Pinouts 16 D Style Motors Connectors and Pinouts 16 M Style Motors Connectors and Pino...

Page 16: ...IN 1 2 3 4 5 NC V NC except DeviceNet V Isolated GND CAN H CAN L DESCRIPTION 5 Pin CAN female 1 2 3 4 5 6 7 8 9 10 11 12 I O 16 GP I O 17 GP I O 18 GP I O 19 GP I O 20 GP I O 21 GP I O 22 GP I O 23 GP...

Page 17: ...wer In 24Vmax Chassis GND Earth GND Common Amplifier Power 48Vmax PIN DESCRIPTION POWER INPUT RS 485 serial communication uses a voltage differential signal Appropriate terminating resistors should be...

Page 18: ...network of SmartMotors being used to raise lower one or more stage props based on inputs from the DMX controller Each motor is assigned a unique DMX address so it can be operated from the DMX control...

Page 19: ...able configuration for D style motors To supply power it is recommended that you use the DE power option For details see the Class 5 SmartMotor Installation Startup Guide NOTE DMX support is on RS 485...

Page 20: ...OM0 it uses pins 2 and 3 of the 8 Pin COM Encoder Bus connector NOTE On the SmartMotor the RS 485 line labeled A is the non inverting line D This may be different than other systems where B is the non...

Page 21: ...les travel limits and nothing else LED 0 will be solid red for 500 milliseconds and then begin flashing green LED 1 will be off P1 Power Input LED 0 LED 1 P2 COM Encoder Bus P3 I O Connector P4 Limit...

Page 22: ...X on the SmartMotor This chapter provides information about DMX operation on the SmartMotor DMX Implementation 23 Data Storage and Usage 23 Example 24 Status Bits 25 End of Packet 25 DMX Commands 27 S...

Page 23: ...r program must read incoming DMX data in the aw registers and perform all actions from that data including motion and or digital outputs For example if you want to control the position of a theater li...

Page 24: ...a the 16 bit word locations are used for storage in order to represent the data as unsigned numbers When stored as words the values 0 through 255 appear unsigned If the values were presented as bytes...

Page 25: ...any of user status bits 0 15 as a general purpose user status bits Use user status bits 16 31 Status Word 13 if general purpose user status bits are required End of Packet User bit 2 reports when the...

Page 26: ...ag is set when the second byte is saved to aw 1 Arrival of last expected channel User use command UR 1 12 2 COMCTL 3 value sync on channel value where value is the channel num ber 1 512 value 512 by d...

Page 27: ...the DMX specific commands that are available on the SmartMotor The commands are organized by function Select DMX Channels The following commands are used to select the DMX channels NOTE If the input...

Page 28: ...DMX 1 N 250000 2 8 D uses COM1 for D style motors by default DMX on COM1 is disabled port closed l OCHN DMX 0 N 250000 2 8 D uses COM0 for M style motors Data begins writing into the aw x registers a...

Page 29: ...SmartMotor Installation Startup Guide NOTE The programs and code samples in this manual are provided for example purposes only It is the user s responsibility to decide if a particular code sample or...

Page 30: ...it moves against a limit looks for resistance and then declares and moves to a home position located 100 counts from the hard stop The figure following the program illustrates these steps MDS Using Si...

Page 31: ...tMotor DMX Guide Rev C Page 31 of 46 Star ng posi on Find home using hard stop Physical stop Posi on a er homing Home offset Move toward hard stop 1 Bump hard stop 2 Move out to speci ed count home va...

Page 32: ...may be summed is 3 or 24 bit position unsigned int s 0 First motor array variable index to use starting with aw s NOTE aw 0 thru 101 are available NOTE Data ranges for the value of n for number of cha...

Page 33: ...ault interrupt ITRE Enable global interrupts Main Program Loop WHILE 1 NOTE This loop constantly polls DMX data and scales it directly to target position IF B 12 2 1 Check for next data packet UR 2 Cl...

Page 34: ...t to velocity mode ZS Clear previous errors T tt rr Preset torque values G Begin move toward hard stop WHILE ABS EA ee LOOP Loop while position error is within limit MTB Mode Torque Break to stop MT S...

Page 35: ...t DMX address ECHO Set ECHO on not required for DMX EIGN W 0 Disable hardware limit switch check for demo purposes ZS Clear any startup errors Variables for DMX control b 1 Set DMX base address Valid...

Page 36: ...pen DMX channel COM1 no parity 250 kBd 2 stop 8 data datamode GOSUB 100 Always run a homing routine before DMX Set Initial Values UR 2 Clear flag so that we know when the end of the next data packet a...

Page 37: ...ed aa 1000 Home accel ee 100 Home error limit tt 3000 Home torque limit hh 4000 Home offset Home Routine home to hard stop AMPS 512 Reduce power VT vv rr Set home velocity ADT aa Set home accel MV Set...

Page 38: ...r of DMX channels to use NOTE max that may be summed is 3 or 24 bit position unsigned int s 0 First motor array variable index to use starting with aw s NOTE aw 0 thru 101 are available The main WHILE...

Page 39: ...es it directly to target position IF B 12 2 1 Check for next data packet t CLK tt t time in msec since last data packet received tt CLK UR 2 Clear flag so we know when next packet arrives nn n 1 p 0 Z...

Page 40: ...8 bit n 2 0 to 65535 DMX channel 3 8 bit n 3 0 to 255 ADDR 1 Set the serial address EIGN W 0 Disable hardware limit switch checking for demo purposes ZS Clear any startup errors DMX control for varia...

Page 41: ...d 2 stop 8 data datamode Home to hard stop GOSUB 100 C100 home to hard stop program Always run a homing routine before DMX It can be commented out if necessary Set initial values UR 2 Clear flag so th...

Page 42: ...C100 Parameter settings edit as required rr 1 Homing direction vv 10000 Homing speed aa 1000 Homing acceleration ee 100 Homing error limit tt 3000 Homing torque limit hh 4000 Homing offset AMPS 512 R...

Page 43: ...in a continuous loop or is disabling communications To prevent the program from running on power up use the Communications Lockup Wizard located on the SMI software Communications menu Motor disconne...

Page 44: ...igh Consider adding heat sinks or forced air cooling to the system Excessive position error The motor s commanded position and actual position differ by more than the user supplied error limit Increas...

Page 45: ......

Page 46: ...PN SC80100004 001 Rev C...

Reviews: