Pacific Digital RI-310e Power Supply User Manual


 
Pacific Research Solutions RI-300e User Manual
Page 108
The following examples are designed to get you started. Do not forget that when you are building a macro over the air, you
must add a 64 in front of the conditional statement and all S-Commands.
You can test a conditional statement when the controller is unlocked. To do this, send only the conditional statement, without
the 64 in front of it. The controller will respond with “TRUE” or “NOT TRUE”.
EXAMPLE 1: In this example, a user command will turn off the system if you are encoding a 123.0Hz CTCSS tone, else an
error message will be played. First, create a user command that points the memory address of the conditional
statement.
IF Current CTCSS Decode = 19 (123.0Hz) THEN execute S-Command “010” ELSE play speech message
“PLEASE CONTACT THE CONTROL OPERATOR”.
63 [Start Line] Select the point in memory for this macro, the point referenced by the user command.
65 25 0 19 Conditional statement, if current CTCSS tone decode equals 123.0Hz then
01 0 Turn off the system.
64 ELSE, terminate the TRUE part of the macro.
30 001 Start of message.
30 008 Pause 1 second before speech
30 429 “PLEASE”
30 174 “CONTACT”
30 531 “THE”
30 175 “CONTROL”
30 407 “OPERATOR”
30 002 End of message
64 Terminate the FALSE part of the macro.
EXAMPLE 2: In this example, the courtesy message will change when the auxiliary output is enabled. To keep things
simple, this macro will call the two messages that are located at start lines 105 and 110. You will have to
point the current courtesy message to macro line 100.
IF AUX output mode > 0 THEN call message at start line 105, ELSE, call the message at start line 110.
63 100 Select start line 100 for this macro, the point referenced by the courtesy message.
65 37 3 0 Conditional statement, if AUX output mode > 0 then
67 105 Call message at start line 105.
64 ELSE, terminate the TRUE part of the macro.
67 110 Call message at start line 110.
64 Terminate the FALSE part of the macro.
EXAMPLE 3: This example is the same as example 2 but it will also test to see if auxiliary input 2 is on.
IF AUX output mode > 0 AND AUX input enable = 2, THEN call message at start line 105, ELSE call the
message at start line 110.
63 100 Select start line 100 for this macro, the point referenced by the courtesy message.
65 37 3 0 # 38 0 2 Conditional statement, if AUX output mode > 0 AND AUX input enable = 2 then
67 105 Call message at start line 105.
64 ELSE, terminate the TRUE part of the macro.
67 110 Call message at start line 110.
64 Terminate the FALSE part of the macro.