Receivers
Both ASCII and binary-based custom protocols use receiver operators to define where in a schema's logic data is to be received from a corresponding broadcast operator. The receiver object uses a template identical to that of a broadcast operator. It has a set of matching input and output pins that correspond to the data pins of a broadcast operator using the same template. The input pins are used as a matching mechanism for the received message, wherein if the input pin is connected and the data fed to the pin matches the corresponding field of the template a message received indicator is strobed.
Refer to Figure 9.84, Figure 9.85 and Figure 9.86 to follow this example. The receiver operators in a schema can be configured to "listen" for a message matching one of the template formats defined in ASCII Settings. Which message is defined by right clicking on the operator and selecting a message from the pulldown. Broadcast operators send their responses based upon the receipt of a message which activates a receiver with the message name defined in that receiver's hardware connection. For example, the receiver GetTemp is defined to "fire" when a message GETparm comes in with a 2 in position 3. SendResTemp fires because GetTemp fired as defined in its connection.
NOTE: Any input pin not connected will not be used to match the field of the received message the pin corresponds to. This, effectively, makes any unconnected input pin of the receive operator a "do not care".
NOTE: Floating point input values must match exactly. This means that if a float value is used as a matching input for a receive operator, only whole integer values between -8,388,608 and 8,388,607, powers of two with any sign, and reciprocals of powers of 2 with any sign can be assured of an exact match that will trigger a message received indication, therefore care must be taken for calculated values provided to broadcast pins where the receiver trigger depends on the matching function. Any floating point/analog constant provided to a broadcast operator can be assured of matching an identical floating point/analog constant provided to a receive operator.
Figure 9.84. ASCII Broadcaster and Receiver
Figure 9.85. Message Template Selected During Hardware Connection Link
Figure 9.86. ASCII Broadcaster Properties
The ASCII Custom Protocol Receive operators have multiple Enable On modes.
Always Enabled causes the operator to be tested against every incoming ASCII custom protocol message. The remaining two options only enable the operator when the Enable Input pin of the operator is High or Low as indicated. When activated, the operator will assert the Receive Timeout pin when the operator has been active for at least the Receive Timeout period in mS and no matching message has been received.