PASHA Change Groups

Even with today's high-speed and nearly ubiquitous 100BaseTX network connections, RS-232 is still a very capable method of control with its relatively simple commands with no MAC addresses, IP addresses and subnets etc.  While we do offer TCP/IP control of MWare with the RATC (Remote Access Telnet Command) service within MWare, a lot of people prefer the old warhorse RS-232 because of its relative simplicity.

PASHA is what we call the RS-232 protocol in MWare and it comes with many useful commands.  However, one complaint has been that there was no easy way to keep track of multiple control values without sending multiple Get commands ("Gxxx.") and then parsing the results.  This is because MWare does not "volunteer" information.  You must poll for values.  RATC solved this problem with its Change Groups, meaning that you can set up a list of controls that you want to monitor.  When polled, a list of only the controls that have changed on the list are returned.  This means that one command to poll results in a short or long list of values, depending on the number of changed controls.

Now Change Groups are available with PASHA (but are separate from any RATC Change Groups you may have.  It is covered in a separate topic because it can add unnecessary complexity to those new to serial control of MWare.  Please read and understand the PASHA topic before embarking upon this new adventure in serial coding.

The PASHA Change Groups Protocol (as simple as possible)

Note: The limitations on serial receive buffering present in some control system products can be encountered easily by asking for too many changes at a time. So, for a PASHA client that can only buffer 10 changes at a time (including the "Lnnnn." first part of the response), that client should, on startup, issue a "K800A." to invalidate the change group and get up to 10 responses, and then it should periodically poll with a "K000A.".

Note: Only the 4-character Control Groups beginning with a letter (A-Z and a-z) will be put into each PASHA client change group, something the view file designer should take into account.

Example

The following is an example of a simple scenario in sending and receiving PASHA Change Group commands.  We know that this isn't the easiest topic to grasp, so hopefully, this will help illustrate the concept for you.

Command\s sent to a PASHA port are in Blue and responses from PASHA are in Red.  Comments are in Green.  Actions from within MWare or RAMM are in Purple.

Control Groups:
    Levl (A -100 to +12 Level control)
    Pre1 (SubPreset 1's Loaded LED)
    Pre2 (SubPreset 2's Loaded LED)
    Sig1 (Signal Present LED)

Values Before Start of PASHA:
    Levl = +4.64dB (26734 or 686eh [Hex])
    Pre1 = Off (0 or 0000h)
    Pre2 = On (32767 or 7FFFh)
    Clp1 = Off (0 or 0000h)

Start of PASHA:

K000A.  Change Group Request (first time)
L0004.
  Returns total number of changes to follow (first time means all are sent)
JLevl686A.
 For Control Group Levl, the value is 686E (26734 of 32767 = +4.64)
JPre10000.
 For Control Group Pre1, the value is 0000 (0 of 32767 = Off)
JPre27FFF.
 For Control Group Pre2, the value is 7FFF (32767 of 32767 = On)
JClp10000.
 For Control Group Clp1, the value is 0000 (0 of 32767 = Off)
Level is moved to +11.7dB in MWare
SubPreset 1 is Loaded from RAMM

K000A.
 Change Group Request
L0003.
 Returns that there are 3 values to follow
JLev17F05.
 For Control Group Levl, the value is 7F05 (32517 of 32767 = +11.7)
JPre17FFF.
 For Control Group Pre1, the value is 7FFF (32767 of 32767 = On)
JPre20000.
 For Control Group Pre2, the value is 0000 (0 of 32767 = Off)
Music starts and gets loud enough to light the Clip LED

K000A.
 Change Group Request
L0001.
 Returns that there is 1 value to follow
JClp17FFF.
 For Control Group Clp1, the value is 7FFF (32767 of 32767 = On)
and so on...

This should begin to illustrate the concept enough to get you started.  Remember in your controller code that you should send a reset request (Change Group Request with 8 as the MSB (e.g. K800A.)) to prime all qualified Control Groups to be returned.  This Reset, should be used when your controller resets to extract all current values from MWare.  Subsequent requests should only call for changes since the first reset call.

PASHA Change Group Monitor

The PASHA Change Group Monitor allows you to monitor a Control Group's level in decimal from within MWare.  Simply Control Group the purple text blocks to the control(s) you want to monitor.  The White blocks will accept your description in Control Mode (don't Control Group them!).  Use the Windows Calculator program in Scientific mode to quickly convert this decimal value to hexadecimal.

Related Topic

PASHA