Siemens SIMATIC IOT Operating Instructions Manual page 82

Hide thumbs Also See for SIMATIC IOT:
Table of Contents

Advertisement

Maintaining and repairing the device
6.6 Configure IOT2050 SM
3. Read the value of digital output channel 0 individually:
4. Write the value of digital output channel 1 individually:
5. Read the value of digital input channel 0 individually:
The above examples use Linux command line to operate the file node.
You can also use C/C++, Python, Java and other programming languages to operate the
above file nodes.
Example
The following uses the C language as an example:
to di0 for loop test */
82
$ cat /eioFS/controller/slot1/dq0/value
1
$ echo 1 > /eiofs/controller/slot1/dq1/value
$ cat /eiofs/controller/slot1/di0/value
0
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
/* The following code depends on di0 of sm1223-ac-rly connected
int main(int argc, char *argv[])
{
#define TMP_SIZE 16
char tmp[TMP_SIZE] = { 0 };
int dq0 = open("/eiofs/controller/slot1/dq0/value", O_RDWR);
if (dq0 < 0) {
return 0;
}
int di0 = open("/eiofs/controller/slot1/di0/value", O_RDWR);
if (di0 < 0) {
close(dq0);
Operating Instructions, 03/2024, A5E39456816-AF
SIMATIC IOT2050

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic iot2050Simatic iot2050 smSimatic iot2050 m.2

Table of Contents