Structured Text How-To Guide
Please open up this guide, purchase the recommended book, and go through the instructions.
Accessing and Programming the Samsara IG21 RTU with Structured Text (ST)
The IG21 is a fully functional, cloud-managed PLC that allows users to develop programs using industry standard IEC 61131-3 language. Programs are developed on a central dashboard, and run locally on the device. This allows flexibility in remote management and program auditing, while ensuring that all control functionally happens locally onsite without dependencies on external connectivity.
How and where to access PLC programs on the IG21:
When in the Industrial section, select Automation. Find the correct Gateway and select Details.
This will display the Deployed Program page. For a new setup, this page will be blank. Select Edit to create a new program on this device.
This page allows you to write programs in Structured Text, view past revisions, and compile and deploy code.Samsara Structured Text Development Environment
The development environment includes the program list in the left pane, text editor in the right pane and controls in the upper right.
To save code, press the Save button in the upper right hand corner. The program will be saved for future use in the programs list.
Before deploying code, it is required to compile. Click Compile in the upper right hand corner to check code for errors.
Once the code is compiled, select Deploy to run the program on the IG21.
Available inputs on the IG21
The IG21 has 4 Analog Inputs, 2 Analog Outputs, and 6 Digital Input/Outputs available for use.
Both Analog and Digital Program Variables will be referenced as LREAL. Use 0.0/1.0 as TRUE/FALSE mapping for Digital Outputs.