Pacific Digital RI-310e Power Supply User Manual


 
Pacific Research Solutions RI-300e User Manual
Page 107
Passing S-Commands to Another Controller
S-Commands can be sent from one controller to another when you have multiple controllers connected together via the
auxiliary buss. This is done by including the destination controller’s address in front of the S-Command. When the destination
controller address leads the S-Command, that S-Command is not executed in the source controller. When you have an S-
Command that needs to be executed in another RI-300 controller, you simply insert (for example) an “A1” into the macro
before the S-Command and its data. All data from the “A1” through the “C” (S-Command separator) will be sent to the
controller which has a “1” set as its controller address. Each controller in the system will have its own address. When sending
an S-Command to another controller, the controller with the same address as the “A” number in the S-Command will execute
that S-Command. In other words, a controller with address 1 will respond to an S-Command with an “A1” prefix. A controller
with address 3 will respond to an S-Command with an “A3” prefix. The “controller address” is set with
S-Command 39 and can be any address from 1 through 9. For controllers to communicate in this format, S-Command 38 must
be in the default state mode 1, serial port mode. The following example will send an S-Command to another controller to turn
off the CTCSS/DCS tone for that controller.
1. Un-lock the controller with your password.
2. Send “63 152” and un-key; you should hear a speech message “line one hundred fifty two”. This will set the macro start
line pointer to line 152.
3. Send “64 A1 01 1” and un-key; you should hear a speech message “ay one zero one one”.
The “64” is the macro editor command. A1 is the address of the controller that will execute the following S-Command.
The “01” is the system mode S-Command.
The “1” is the repeater COS access S-Command data.
4. Send “64” and un-key, you should hear a speech message “end of sequence”.
The “64” without data will tell the controller to insert a “D” to mark the end of this macro.
5. The data stored in the macro table at line 152 will look like “A1011CD”.
Using Conditional Statements (IF-THEN-ELSE)
Conditional statements are used to test a system variable and then perform one of two macros based on if the test is true or false.
All conditional statements have an EXPRESSION part; this is where the system variable is tested. If the EXPRESSION is true,
THEN the first STATEMENT following the EXPRESSION is executed. ELSE, the STATEMENT following the following the
first STATEMENT is executed. The macro terminator character (S-Command 64 or "D") is used to separate the first
STATEMENT from the second. A STATEMENT is nothing more then a group of S-Commands. You can also BIND multiple
EXPRESSIONS together to test more the one system variable in a single conditional statement. You can even nest conditional
statements, but the controller will completely terminate the macro or conditional statement once the first macro terminator
(“D”) is encountered. Beneath the expression below is the “65” command that creates the expression.
if EXPRESSION then STATEMENT else STATEMENT end
65 [Variable] <Index> [Operation] [Reference] “C” (S-Commands) “D” (S-Commands) “D”
if EXPRESSION bind EXPRESSION then…
65 [Variable] <Index> [Operation] [Reference] [Bind] [Variable] <Index> [Operation] [Reference]
if: The S-Command itself (65).
EXPRESSION: This is the part that tests the system variable and has up to 4 parts as follows:
Variable: This is an internal value that is tested in the conditional statement.
Index: Some system variables must be indexed to define a sub value in a set of values.
Operation: Compares the variable to the reference. (Equal, Not equal, Less then, Greater then)
The result of the compare is either true or false.
Reference: This is the value that is compared to the variable. The result of the compare is either true or false.
bind: Binding is optional and is used to bind multiple expressions together. (or, and)
Binding is a logical OR/AND of two or more expressions.
then: This is the character “C” that ends the EXPRESSION part. After the “C” is the first STATEMENT part.
STATEMENT: This is a group of S-Commands that make up the macro. The first STATEMENT is executed based on
a true EXPRESSION and the second STATEMENT is executed based on a false EXPRESSION.
else: This part is the first character “D” and separates the true STATEMENT from the false STATEMENT.
Conditional statements can be used to determine if a valid CTCSS tone is being decoded before a user command is executed.
You can change a courtesy tone if a link is active, or skip an ID based on a selected CTCSS decode tone. The list is endless.