Q-Code User Manual
Ver. 7.0 2021/11/30
240
4.23.1 PlayA / PlayAS
User can use this command in
Q-Code
to output signals of Action, which is drawn using
Q-Visio.
PlayA (Px.n, Ch, {VIOLabel.}Label{, Extension}{, Loop}) {*n} { &[ BG1 {,BG2 {,BG3}} ] }
PlayAS (Px.n, Ch, {VIOLabel.}Label{, Extension}{, Loop}) { &[ BG1 {,BG2 {,BG3}} ] }
PlayA (Ch, VIOLabel{, Extension}{, Loop}) {*n} { & [BG1 {,BG2 {,BG3}} ] }
PlayAS(Ch, VIOLabel{, Extension}{, Loop}) { & [BG1 {,BG2 {,BG3}} ] }
PlayA:
Next command will be executed after Action play ends.
PlayAS:
Next command will be executed right after Action play starts.
Px.n:
Output to assigned pin.
Ch:
Action channels.
NY4 / NY5 / NY5+ / NY6 / NY7 / NY9T support Ch1 ~ Ch8.
NX1 supports Ch1 ~ Ch20.
VIOLabel:
Indicate which action file to play.
Label:
Indicate which signal from action file to play.
Extension
: The extension function can extend length of signals to save ROM size. Range 1 ~ 15.
Assign value.
Ex.
PlayA(PE.0, 1, $VIO0.A1, 4)
Ri (support 1 Ri)
Ex.
PlayA(PE.0, 1, $VIO0.A1, R0)
Loop:
Output action repeatedly until other command stops action output, ex, StopA. This parameter is
optional.
Note:
1. NX1 does not support play by whole action file, only supports single signal in action file.
2. NY4 / NY5 / NY5+ / NY6 / NY7 / NX1 do not support Extension parameter.
3. When user plays VIO files and outputs multiple signals simultaneously, the signals must
have equal output time length. If the time lengths are unequal, the output time would base
on the longest time length of the signal, and the deficiency time length of other signals
would be output as 0% forcibly.
4. In NY9T, the resolution of Action counter is only 1ms, the variable range is narrow, and it is
not recommended that set Ascend/Descend as output signals.
5. When user opens Loop function and outputs multiple signals, the signals must have equal
output time length to avoid signal discontinuity.
Ex.
Path1: PlayA(PB.0, 4, $A1)
; Play signal “A1” at channel 4, output to PB.2.
Path2: PlayAS(PB.1, Ch3, $EyeMotion)
; Play signal “EyeMotion” at channel 3, output to PB.1.
Path3: PlayAS(PB.2, Ch2, $A3)
; Play signal “A3” at channel 2, output to PB.2.
Path4: PlayA(PB.2, Ch2, $VIO1.A3)
; Play signal “A3” of VIO1 action file at channel 2,
; output to PB.2
Path4: PlayA(Ch4, $VIO1)
; Play signal “VIO1” at channel 4.