TSChannel
Last updated
Last updated
Download ready-made script examples to get started quickly.
Managing Scripts → Download script → TSChannel
The script demonstrates the transfer of calculated values, indicator parameters and an interactive constant to the data channel. Also takes the inverse value from TSChannel-Demo-Receiver.
Demonstrates the reception of values from the channel, their usage in the form of ordinary values and indicator parameters. Transmits a single value back to the TSChannel-Demo-Transmitter.
All the blocks intended for working with TSChannel are collected in a separate group called TSChannel.
Transmits all the “key: value” pairs formed by packer blocks to the TSChannel server. The transfer of a batch of values occurs at the time of recalculation of the script.
Parameters
API Key - The key that determines which TS Transmitter values will be transmitted to. Copy the API Key value from the "Transmitter" of the corresponding channel in your account on signal.tslab.pro
Input
The "Source" must be connected to the input of the block.
Output
Value packer blocks are connected. Only the values that are connected to the transmitter block will be transmitted to the channel. One script can contain several transmitters working with different channels and transmit a different set of values to each channel.
Generates a “Key/Value” pair based on a parameter of another block, for example, an indicator.
Block’s Name
Defines the key (name) of the value passed to the channel. When it is received in another script, it will be possible to identify the value by this name.
Input
It is connected to a block of the "Transmitter" type, which transmits values to the corresponding channel.
It is connected to the "Slave" input of the "Linked parameter" block and receives the parameter value for subsequent transmission to the data channel.
Generates a “Key/Value” pair based on the value calculated in the script.
Block’s Name
Defines the key (name) of the value passed to the channel. When it is received in another script, it will be possible to identify the value by this name.
Input
It is connected to a block of the "Transmitter" type, which transmits values to the corresponding channel.
It is connected to the block that calculates the required value. The value received as an input will be transmitted to the data channel.
Receives data packets from the TSChannel. A new data packet is received when the script is being recalculated.
Parameters
API Key - The key that determines which TSChannel the values will be taken from. Copy the API Key value from the "Receiver" of the corresponding channel in your account on signal.tslab.pro
Input
The "Source" must be connected to the input of the block.
Output
It is connected to the Value Decoder blocks to extract the necessary “key/value” pairs.
Extracts the value corresponding to the desired key from the received data packet and makes it available for further calculations.
Block’s Name
Defines the key (name) of the unpacked value.
Input
It is connected to the "Receiver" block, which receives data from the desired channel.
Output
Unpacked value. Connects to the block that uses it in the script logic.