Issue
How can more than 50 globals be transmitted from a Sigma controller when there are many digital object states to share between controllers?
Product Line
Satchwell BAS & SigmaEnvironment
Sigma Controller (all)
Cause
Sigma controllers are inherently limited to broadcasting a maximum of 50 global variables.
Resolution
To overcome the 50-global limit, you can encode multiple digital object states into a single analogue value using a binary count method. This allows up to 16 digital states to be represented and transmitted as one global analogue value.
This method leverages the MASK command in Sigma programmable objects to decode the analogue value back into individual digital states.
Implementation Steps
-
Create a Programmable Object in the Transmitting Controller
- Use binary counting to combine up to 16 digital objects into a single analogue value.
- Each bit in the binary representation corresponds to the on/off state of a digital object.
- An analogue value of 901 represents the binary value 0000001110000101, where each bit (1 or 0) indicates the state of a digital input (DI) object.
Example:
Create a program object in the transmitting controller that 'binary' counts up to 16 digital objects:10 XINT = 0 20 IF POINT 0|180 ON THEN XINT = XINT + 1 1st condition 30 IF POINT 0|181 ON THEN XINT = XINT + 2 2nd condition 40 IF POINT 0|182 ON THEN XINT = XINT + 4 3rd condition 50 IF POINT 0|183 ON THEN XINT = XINT + 8 4th condition 60 IF POINT 0|206 ON THEN XINT = XINT + 16 5th condition 70 IF POINT 0|207 ON THEN XINT = XINT + 32 6tht condition 80 IF POINT 0|208 ON THEN XINT = XINT + 64 7th condition 90 IF POINT 0|209 ON THEN XINT = XINT + 128 8th condition 100 IF POINT 0|210 ON THEN XINT = XINT + 256 9th condition 110 IF POINT 0|214 ON THEN XINT = XINT + 512 10th condition 120 IF POINT 0|215 ON THEN XINT = XINT + 1024 11th condition 130 IF POINT 0|216 ON THEN XINT = XINT + 2048 12th condition 140 IF POINT 0|217 ON THEN XINT = XINT + 4096 13th condition 150 IF POINT 0|218 ON THEN XINT = XINT + 8192 14th condition 160 IF POINT 0|202 ON THEN XINT = XINT + 16384 15th condition 170 IF POINT 0|203 ON THEN XINT = XINT + 32768 16th condition 180 XFLO = FLOAT ( XINT ) 190 RETURN VIA TEXT 153 VALUE XFLO -
Set Up Bit Masking in the Receiving Controller
- In the receiving controller create up to 16 programmable objects to decode the transmitted analogue value.
- Use the MASK command to extract individual digital states from the binary representation.
1st load 10 XINT = NINT POINT 0|222 20 YINT = XINT MASK ( 1 ) 30 IF YINT = 1 THEN RETURN TRUE "load 1 on" 40 RETURN FALSE "load 1 off" -------------------------------------------------------------- 2nd load 10 XINT = INT POINT 0|222 20 YINT = XINT MASK ( 2 ) 30 IF YINT = 2 THEN RETURN TRUE "load 2 on" 40 RETURN FALSE "load 2 off" -------------------------------------------------------------- 3rd load 10 XINT = INT POINT 0|222 20 YINT = XINT MASK ( 4 ) 30 IF YINT = 4 THEN RETURN TRUE "load 3 on" 40 RETURN FALSE "load 3 off" -------------------------------------------------------------- 4th load 10 XINT = NINT POINT 0|222 20 YINT = XINT MASK ( 8 ) 30 IF YINT = 8 THEN RETURN TRUE "load 4 on" 40 RETURN FALSE "load 4 off" -------------------------------------------------------------- 5th load 10 XINT = NINT POINT 0|222 20 YINT = XINT MASK ( 16 ) 30 IF YINT = 16 THEN RETURN TRUE "load 5 on" 40 RETURN FALSE "load 5 off" -------------------------------------------------------------- 6th load 10 XINT = NINT POINT 0|222 20 YINT = XINT MASK ( 32 ) 30 IF YINT = 32 THEN RETURN TRUE "load 6 on" 40 RETURN FALSE "load 6 off" -------------------------------------------------------------- 7th load 10 XINT = NINT POINT 0|222 20 YINT = XINT MASK ( 64 ) 30 IF YINT = 64 THEN RETURN TRUE "load 7 on" 40 RETURN FALSE "load 7 off" --------------------------------------------------------------
🔗 Click here for detailed setup instructions