System Call FIRST parameter
Frequently Asked Questions
Brand:
- AMX
Models:
- Netlinx
Question:
In all of the System Call information, the last parameter in the System Call is 'FIRST'. What is 'FIRST' and how is it used?
Answer:
'FIRST' is an offset for the system call. 'FIRST' defines the channel to be used for PLAY (as an example), but 'FIRST' also defines the feedback channel to be used for play too.
AMX has standardized the first 42 channels in an IRLib file. '1' is always 'PLAY'; '2' is always 'STOP'; '3' is always 'PAUSE'; . . . etc. System calls similarly always use certain channels for feedback. '241' is always 'PLAY FEEDBACK'; '242' is always 'STOP FEEBACK'; '243' is always 'PAUSE FEEDBACK'; . . . etc. On occasion you may need to readjust the standard channel locations to accommodate a non-standard file or to accommodate a Deck A/Deck B situation.
The Deck A/Deck B situation is sometimes the most extreme case, because both the starting channel and starting feedback channel needs to be adjusted in order for the System Calls to work properly. Because a System Call Parameter is a two-byte value, the System Call uses the lower byte for the starting Channel and the upper byte for the starting Feedback Channel. As an example consider a dualwell cassette deck, whose Deck A follows AMX's IR Standards and whose Deck B follow the AMX standard format but 'PLAY' begins at channel '61'.
(Hint: You can use math expressions within the System Call)
SYSTEM_CALL [1] 'CAS1' (CASS, TP, 21, 22, 23, 24, 25, 26, 0)
SYSTEM_CALL [2] 'CAS1' (CASS, TP, 31, 32, 33, 34, 35, 36, (61 + ($100 * 231)))In this example 3 concepts are shown:
- notice the different instance numbers for each System Call. This insures that the waits imbedded in the System Calls do not overlap;
- The PLAY channel gets reassigned to channel 61;
- By multiplying 231 by $100 it moves 231 to the upper byte. As mentioned in the Hint above, the use of a math expression simplifies understanding the parameter's data. The math expression is much easier to understand than using '59197' or '$E73D'.