Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 365 of 909
EXAMPLE:
'Variables for DMX control:
b=1 'Set DMX base address Valid Address: 1 thru 512.
n=3 'Set number 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].
'Configure DMX data usage and motor variable storage:
IF n>3 PRINT("n too large.",#13) END ENDIF
'Limit "n" based on a max of 3 bytes.
IF b>(513-n) PRINT("b too large.",#13) END ENDIF
'Limit "b" based on max data slot.
IF s>(102-n) PRINT("s too large.",#13) END ENDIF
'Limit "s" to max array value.
q=b+n-1 'Last data channel used (will be trigger when data received).
COMCTL(1,b) 'Set base DMX channel to value from CADDR.
COMCTL(2,n) 'Accept 1 DMX channel of data.
COMCTL(3,q) 'Status word 12 bit 2 will be set to 1 when
'channel "q" arrives.
COMCTL(4,s) 'Set start of array index storage (good for
'bypassing cam mode dynamic array).
OCHN(DMX,1,N,250000,2,8,D) 'Open DMX channel: COM 1, no parity,
'250 kBd, 2 stop, 8 data, datamode.
RELATED COMMANDS:
OCHN(...) Open Channel (see page 601)
Part 2: Commands: COMCTL(function,value)