Class 5 DMX Guide
Class 5 DMX Guide
Class 5 DMX Guide
Table Of Contents
Introduction
Purpose
Combitronic Technology
DMX Overview
Safety Information
Safety Symbols
12
Additional Documents
12
Additional Resources
13
DMX Resources
13
15
16
16
17
DMX NetworkTopology
17
18
19
20
21
23
DMXImplementation
24
24
Example
25
Status Bits
26
End of Packet
26
DMXCommands
28
28
29
29
29
Example Programs
31
32
34
37
40
Troubleshooting
43
Introduction
Introduction
This chapter provides an overview of the DMX features provided by the Moog Animatics
SmartMotor. It also provides information on safety, and where to find related documents and
additional resources.
Purpose
Combitronic Technology
DMX Overview
Safety Information
Safety Symbols
12
Additional Documents
12
Additional Resources
13
DMX Resources
13
Purpose
Purpose
This manual explains the Moog Animatics Class 5 SmartMotor support for the Digital
MultipleX (DMX) communications protocol. It describes the major concepts that must be
understood to integrate a SmartMotor as a DMX slave device. However, it only minimally
covers the low-level details of the DMX protocol.
NOTE: The Remote Device Management (RDM) bidirectional communication
extension of the DMX protocol is not supported.
The feature set described in this version of the manual refers to firmware in the 5.x.4.y
series, where x = 0, 16, 32, 97 or 98, and y=3 or greater. Versions 5.0.4, 5.16.4, and 5.32.4
are specific to D-style motors, and versions 5.97.4 and 5.98.4 are specific to M-style motors.
Refer to the following lists.
NOTE: The SmartMotor firmware must be one of the listed versions.
For D-style motors:
l
This manual is intended for programmers or system developers who have read and
understand 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 be used to understand the specific implementation details for
the Moog Animatics Class 5 SmartMotor. Additionally, code examples are provided to assist
the programmer with the SmartMotor integration.
The Command Reference section of this manual includes details about the specific DMX
commands available in the SmartMotor through the DMX firmware. For details, see
DMXCommands on page 28.
Combitronic Technology
The most unique feature of the SmartMotor is its ability to communicate with other
SmartMotors and share resources using Moog Animatics Combitronic technology.
Combitronic is a protocol that operates over a standard CAN interface. It may coexist with
CANopen and other protocols. It requires no single dedicated master to operate. Each
SmartMotor connected to the same network communicates on an equal footing, sharing all
information, and therefore, sharing all processing resources.
While the Combitronic protocol can be used in parallel with a DMX network, there are certain
restrictions:
l
The DMX wiring does not carry the Combitronic signal. Therefore, additional cabling
(available from Moog Animatics) must be used to build the Combitronic network.
Combitronic Technology
l
Compute or synchronize motion between motors within the same Combitronic network.
For example, DMX values (from the host controller) could be used to adjust amplitude
and frequency of SmartMotor Cam tables for an electronic camming or gearing
application that controls the motion pattern of a bank of stage lights.
In short, DMX-equipped SmartMotors retain all the features and benefits of the standard Class
5 SmartMotor, including features like electronic camming, gearing, and Combitronic support.
For additional details, see the Moog Animatics Class 5 SmartMotor User's Guide.
DMX Overview
DMX Overview
DMX is a standard for digital communications networks that are used to control lighting, stage
effects, dimmers, fog machines and related applications. This control may include positioning
and/or focusing of lights or other objects to aid in visual effects of stage productions or other
live events. As a result, its use is often expanded to the movement or control of curtains,
stage props or other objects that require motion.
DMX, or further expanded as DMX512, is an EIA-485 (RS-485) hardware-based protocol that is
unidirectional in nature the controller only sends data; it does not receive data. Further, it
has no error checking or checksums that are required for use in hazardous applications.
Therefore, its use must be limited to safe operating environments where failure due to
transmission 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.
START
IDLE
BREAK
100 s
(could be as
low as 92 s)
MAB
DMX512 controllers transmit asynchronous serial data at 250 kilobaud (kBd). The data format
is fixed and begins with a single start bit, eight data bits, and two stop bits with no parity. Up
to 512 8-bit data bytes or "channels" of data may be transmitted to all nodes at once. The data
is ordered serially and typically runs continuously from a DMX master controller. The full data
packet begins with a break, followed by a Mark after Break (MAB), then Slot 0 beginning with
a one-byte Start Code, and that is followed by up to 512 data slots. Refer to the following
figure.
Start Code in Slot 0
(followed by up to 512 data channels)
1 2
Safety Information
Safety Information
This section describes the safety symbols and other safety information.
Safety Symbols
The manual may use one or more of the following safety symbols:
WARNING: This symbol indicates a potentially non-lethal mechanical hazard,
where failure to follow the instructions could result in serious injury to the
operator or major damage to the equipment.
Motor Sizing
It is the responsibility of the machine/system designer to select SmartMotors that are
properly sized for the specific application. Undersized motors may: perform poorly, cause
excessive downtime or cause unsafe operating conditions by not being able to handle the
loads placed on them. The Moog Animatics Product Catalog, contains information and
equations that can be used for selecting the appropriate motor for the application.
Replacement motors must have the same specifications and firmware version used in the
approved and validated system. Specification changes or firmware upgrades require the
approval of the system designer and may require another Risk Assessment.
Environmental Considerations
It is the responsibility of the machine/system designer to evaluate the intended operating
environment for dust, high-humidity or presence of water (for example, a food-processing
environment that requires water or steam wash down of equipment), corrosives or chemicals
that may come in contact with the machine, etc. Moog Animatics manufactures specialized IPrated motors for operating in extreme conditions. For details, see the Moog Animatics Product
Catalog.
Machine Safety
In order to protect personnel from any safety hazards in the machine or system, the
machine/system builder must perform a "Risk Assessment", which is often based on the ISO
13849 standard. The design/implementation of barriers, emergency stop (E-stop)
mechanisms and other safeguards will be driven by the Risk Assessment and the safety
standards specified by the governing authority (for example, ISO, OSHA, UL, etc.) for the
locale where the machine is being installed and operated. The methodology and details of
such an assessment are beyond the scope of this manual. However, there are various sources
of Risk Assessment information available in print and on the internet.
NOTE: The following list is an example of items that would be evaluated when
performing the Risk Assessment. Additional items may be required. The safeguards
must ensure the safety of all personnel who may come in contact with or be in the
vicinity of the machine.
In general, the machine/system safeguards must:
l
Provide a barrier to prevent unauthorized entry or access to the machine or system. The
barrier must be designed so that personnel cannot reach into any identified danger
zones.
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 an E-stop
mechanism. Buttons that start the machine must be protected from accidental
activation.
Provide E-stop mechanisms located at the control panel and at other points around the
perimeter of the barrier that will stop all machine movement when tripped.
Provide appropriate sensors and interlocks on gates or other points of entry into the
protected zone that will stop all machine movement when tripped.
Ensure that if a portable control/programming device is supplied (for example, a handheld operator/programmer pendant), the device is equipped with an E-stop mechanism.
NOTE: A portable operation/programming device requires many additional
system design considerations and safeguards beyond those listed in this
section. For details, see the safety standards specified by the governing
authority (for example, ISO, OSHA, UL, etc.) for the locale where the
machine is being installed and operated.
Prevent contact with moving mechanisms (for example, arms, gears, belts, pulleys,
tooling, etc.).
Prevent contact with a part that is thrown from the machine tooling or other parthandling equipment.
Prevent contact with any electrical, hydraulic, pneumatic, thermal, chemical or other
hazards that may be present at the machine.
Prevent unauthorized access to wiring and power-supply cabinets, electrical boxes, etc.
Provide a proper control system, program logic and error checking to ensure the safety
of all personnel and equipment (for example, to prevent a run-away condition). The
control system must be designed so that it does not automatically restart the
machine/system after a power failure.
All operators, maintenance technicians, programmers and other personnel are tested
and qualified before acquiring access to the machine or system.
The above personnel perform their assigned functions in a responsible and safe manner
to comply with the procedures in the supplied documentation and the company safety
practices.
The personnel are supplied with the proper equipment for the environment and their job
functions, which may include: safety glasses, hearing protection, safety footwear,
smocks or aprons, gloves, hard hats and other protective gear.
The work area is equipped with proper safety equipment such as first aid equipment,
fire suppression equipment, emergency eye wash and full-body wash stations, etc.
There are no modifications made to the machine or system without proper engineering
evaluation for design, safety, reliability, etc., and a Risk Assessment.
Additional Documents
The Moog Animatics website contains additional documents that are related to the information
in this manual. Please refer to the following list:
l
SmartMotor ULCertification
http://www.animatics.com/download/MA_UL_online_listing.pdf
Additional Resources
Additional Resources
The Moog Animatics website contains additional resources such as product information,
documentation, product support and more. Please refer to the following list:
l
Product information:
http://www.animatics.com/products.html
Product support (Downloads, How To videos, Forums, Knowledge Base, and FAQs):
http://www.animatics.com/support.html
DMX Resources
The following equipment and software can be used to test your DMX system:
l
DMX512 Standard:
http://www.usitt.org/content.asp?contentid=370
16
16
17
DMX NetworkTopology
17
18
19
20
21
PIN
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
PIN
A1
A2
1
2
3
4
5
DESCRIPTION
I/O-0
I/O-1
I/O-2
I/O-3
I/O-4
I/O-5
I/O-6
Encoder A Out
Encoder B Out
RS-232 Transmit
RS-232 Receive
+5VDC Out
Ground
Power Ground
Power
15 14 13 12 11 10 9
Trajectory LED
DESCRIPTION
+20V to +48V DC
Power Ground
I/O-6
+5VDC Out
RS-232 Transmit
RS-232 Receive
RS-232 Ground
PWR/Servo LED
DESCRIPTION
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
I/O-24 GP
I/O-25 GP
+24VDC Input
GND I/O
1 2
A2
3 4 5
PIN
1
2
3
4
5
DESCRIPTION
NC
+V (NC except DeviceNet)
-V (Isolated GND )
CAN-H
CAN-L
NOTE: The DE power option is recommended. For details, see the Moog Animatics
Class 5 SmartMotor User's Guide.
5-Pin CANopen
(female is standard)
5-Pin
Limit Inputs
LIMIT INPUTS
PIN
1
2
3
4
5
CANOPEN
RUN LED
DESCRIPTION
+24VDC Out
I/O-3 or -Limit
GND-Common
I/O-2 or +Limit
I/O-10
CANOPEN
ERROR LED
I/Os
DESCRIPTION
I/O-0
I/O-1
I/O-4
I/O-5
I/O-6
I/O-7
I/O-8
I/O-9
Not Fault Out
Drive Enable In
+24VDC Out
GND-Common
DESCRIPTION
NC
+V (NC except DeviceNet)
-V (Unisolated Ground)
CAN-H
CAN-L
COMMUNICATION
8-Pin
COM Encoder Bus
PIN
1
2
3
4
5
6
7
8
9
10
11
12
PIN
1
2
3
4
5
12-Pin I/O
SERVO-AMPLIFIER
LED
PIN DESCRIPTION
GND-Common
1
RS-485B CH0
2
RS-485A CH0
3
ENC A+ (In/Out)
4
ENC B- (In/Out)
5
ENC A- (In/Out)
6
+5VDC Out
7
ENC B+ (In/Out)
8
RS-485 serial communication uses a
voltage differential signal. Appropriate
terminating resistors should be included
on the RS-485 network to ensure reliable
performance.
POWER INPUT
TRAJECTORY
LED
PIN
1
2
3
4
DESCRIPTION
Control Power In 24Vmax
Chassis GND/Earth
GND-Common
Amplifier Power 48Vmax
DMX NetworkTopology
As mentioned previously, DMX512 is based on the EIA-485 standard. It comes with all the
limits and requirements of a system based on an RS-485 multi-drop bus. Further, there must
be proper bus termination, as required by the EIA-485 standard. Refer to the following figure.
The EIA-485-A standard for the physical connection allows a length of 1000 feet at 250 kBd.
However, Moog Animatics does not guarantee this distance under all conditions. The user is
responsible for testing and verifying operation in the application environment, including: wire
length, DMX host device, and number of DMX nodes.
At the opposite end from the DMX controller, a 120 Ohm bus terminator must be used (see the
following figure) this prevents reflected impedance and noise issues that would otherwise
occur.
CAUTION: The 120 Ohm terminator is required at the end of the bus opposite
the DMX controller.
DMX512
Controller
(Master)
OUT
120 Ohm
Terminator
Serial IN/OUT
Serial IN/OUT
Serial IN/OUT
SmartMotor
(Slave)
SmartMotor
(Slave)
SmartMotor
(Slave)
SmartMotor
Address: 001
SmartMotor
Address: 002
SmartMotor
Address: 003
SmartMotor
Address: 004
120 Ohm
Terminator
One or more stage props are raised/lowered based on inputs from DMX console
The maximum cable length should not exceed 1000 feet at 250 kBd.
Each slave must be inline or a short drop from the main bus; do not use branches.
Use a 120 Ohm terminator at the downstream end of the bus, which is the end opposite
the DMX512 controller.
CAUTION: The 120 Ohm terminator is required at the downstream end of the
bus.
Trajectory
LED (Bt)
Power/Servo
LED
I/O Connector
Pin Numbers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
9
10
11
12
13
14
15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1
2
3
4
5
6
7
8
Pin 5 A (D+)
Pin 6 B (D-)
Terminating Node
CANOPEN
ERROR LED
8-Pin
COM Encoder Bus
SERVO-AMPLIFIER
LED
TRAJECTORY
LED
Terminating Node
LED 3
LED 2
P4
(Limit Inputs)
P3
(I/O Connector)
LED 1
P2 (COM
Encoder Bus)
P3 (CANopen option)
LED 0
P1 (Power Input)
24
24
Example
25
Status Bits
26
End of Packet
26
DMXCommands
28
28
29
29
29
DMXImplementation
DMXImplementation
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.
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.
Example
Time
first
last
COMCTL(2,3)
COMCTL(4,4)
0 1 2 3 4 5 6 ... ... ... ... ... 101
aw[ ] registers
Data Transfer from DMX to SmartMotor Array
Data from the DMX packet is stored into the SmartMotor user-variable word array. Even
though the channels are 8-bit data, 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, they would appear negative to user
programs when larger than half of the scale.)
Typically, most DMX devices (including the SmartMotor) use a "base channel". The
SmartMotor does that using COMCTL(1,x), where x is the base channel: 1-512.
Example
Settings:
l
DMX
Channel
SmartMotor
Variable
1
2
3
4
5
aw[0]
aw[1]
7
...
Status Bits
Status Bits
To allow a user program to respond to the conditions of the DMX data stream, several user
bits were implemented in the first user status word. This is accessible for reading as Status
Word 12. See the next table for a description of the bits in Status Word 12.
Note the following:
l
These bits cannot be cleared using ZS or Z(word,bit) commands. See notes in table for
specific usage.
All bits in Status Word 12 are cleared when opening the DMX channel. Do not use 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 end of a packet is received. This allows for better synchronization
among slave devices. Previously, a device reading channel 1 versus a device reading channel
512 could have up to 22 milliseconds of skew if they were depending on user bit 1. User bit 2
would minimize or eliminate this skew.
To use this feature, see the COMCTL(3,value) command. Note that:
l
The system programmer may choose a lower channel for value if the upper channels
are not used or if the DMX master does not send all 512 channels.
End of Packet
The following table provides bit descriptions for Status Word 12:
Status
Word
Bit
Description
12
12
12
12
3 - 15
Set By
Cleared By
Reserved.
First
data
Data configuration:
COMCTL(1,3),
COMCTL(2,4)
Status bit B(12,0)
Last
data
2
256
Selected data
Bit set
Bit
seta
Bit
seta
511
512
DMXCommands
The following diagram shows how COMCTL(3,value) is useful in applications with multiple
motors.
DMX Network Packet
Start First
code data
Byte:
Data configuration motor 1:
COMCTL(1,1), COMCTL(2,1)
Last
data
512
Selected
data
Selected
data
Selected
data
Selected
data
Bit
seta,b,c
DMXCommands
The following sections describe the DMX-specific commands that are available on the
SmartMotor. The commands are organized by function.
COMCTL(2,value) Set number of channels [value] to read starting with base channel
(1 through 102); default is 1 at power-up.
COMCTL(3,value) Sync on channel, where value is the channel number 1-512; default
is 512 at power-up. User bit 2 is set when that channel is received. Therefore, a full 512
channel packet will set this bit at the end of the packet.
COMCTL(4,value) Allows for the selection of the aw[] register where the DMX data
begins loading; default is 0 at power-up. For example, COMCTL(4,10) will start loading
DMX data at aw[10].
If the value of the base channel + number of channels exceeds 512, then the additional
channels will be ignored.
If the value of the aw[] starting channel + number of channels exceeds 102, then the
additional channels will be ignored.
Data begins writing into the aw[x] registers as soon as the port is open and valid DMX packets
arrive.
Any other parameters will result in command error, and the state of the port remains
unchanged. DMX specifies these settings: 250 kBd, 8 data bits, 2 stop bits, no parity check.
These commands:
l
Example Programs
Example Programs
This chapter contains example programs that you can use as a guide for developing your
SmartMotor applications. For more details on SmartMotor programming, see the Moog
Animatics Class 5 SmartMotor User's 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
program applies to the application being developed and to adjust the values to fit
that application.
Home Against a Hard Stop
32
34
37
40
Starng posion
Physical stop -
GOSUB(100)
'Always run a homing routine before DMX.
'==================================================================
'
Set Initial Values
UR(2)
'Clear flag so we know when the end of the next
'data packet arrives.
MP
'Set to Position mode.
ADT=800
'Accel/decel value (adjust as needed).
VT=1500000
'Velocity (adjust as needed).
'===================================================================
'
Set up interrupts to linger at higher values:
ITR(0,0,0,0,0) 'Interrupt to catch all motor drive faults.
EITR(0)
'Enable fault interrupt.
ITRE
'Enable global interrupts.
'===================================================================
'
Main Program Loop
WHILE 1
'
Home Routine (home to hard stop)
AMPS=512
'Reduce power.
VT=vv*rr
'Set home velocity.
ADT=aa
'Set home accel.
MV
'Set 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
'Switch to Torque mode in case bounce off hard stop.
G
'Start motion.
WAIT=50
'Wait 50 milliseconds.
O=hh*rr
'Set origin to home offset.
AMPS=1023
'Set power back to max.
MP PT=0 G TWAIT
'Set motor to zero.
RETURN
Purpose
1st
Velocity
2nd
Accel/Decel
3rd
4th
5th
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 arrives.
MP
'Set to Position mode.
ADT=800
'Accel/Decel Value (adjust as needed).
VT=1500000 'Velocity (adjust as needed).
'===================================================================
'Set up interrupts to linger at higher values.
ITR(0,0,0,0,0) 'Interrupt to catch all motor drive faults
EITR(0)
'Enable Fault Interrupt
ITRE
'Enable Global interrupts
ss=s+2
'====================================================================
'Main Program Loop
WHILE1'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)
'Clear flag so we know when next packet arrives.
nn=n-1
p=0
'Zero data value.
WHILE nn>=0'Byte shifting and summing data.
p=p*256+aw[nn+ss]
nn=nn-1
LOOP
'Loop takes 4 msec when using three
'channels (24 bit).
VT=aw[s]*vvv'Set velocity target off of first channel
'x multiplier.
Troubleshooting
Troubleshooting
The following table provides troubleshooting information for solving common problems. For
additional support resources, see the Moog Animatics Support page at:
http://www.animatics.com/support.html
Issue
Cause
Solution
Transmit, receive or
ground pins are not
connected correctly.
Motor disconnects
from SMI
sporadically.
COM port buffer settings Adjust the COM port buffer settings to
are too high.
their lowest values.
Poor connection on
serial cable.
Motor stops
communicating after
power reset, requires
re-detection.
Critical fault.
Troubleshooting
Issue
Cause
Erratic/no
communication over
RS-485.
Solution
RS-485 biasing is
incorrect.
Overcurrent
occurred.
Motor intermittently
drew more than its
rated level of current.
Does not cease motion.
Excessive
temperature fault.
Excessive position
error.
The motor's
commanded position
and actual position
differ by more than the
user-supplied error
limit.
Historical
positive/negative
hardware limit faults.
Common Faults
Compiler default
firmware version set
incorrectly.
SmartMotor not
positioning object at
expected location.
SmartMotor not
responding to DMX
commands.
Varies.
PN: SC80100004-001
Rev. A