EasyManuals Logo

Siemens SIMATIC IOT User Manual

Siemens SIMATIC IOT
133 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #82 background imageLoading...
Page #82 background image
Maintaining and repairing the device
6.6 Configure IOT2050 SM
SIMATIC IOT2050
82 Operating Instructions, 03/2024, A5E39456816-AF
3. Read the value of digital output channel 0 individually:
$ cat /eioFS/controller/slot1/dq0/value
1
4. Write the value of digital output channel 1 individually:
$ echo 1 > /eiofs/controller/slot1/dq1/value
5. Read the value of digital input channel 0 individually:
$ cat /eiofs/controller/slot1/di0/value
0
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:
#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
to di0 for loop test */
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);

Table of Contents

Other manuals for Siemens SIMATIC IOT

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SIMATIC IOT and is the answer not in the manual?

Siemens SIMATIC IOT Specifications

General IconGeneral
BrandSiemens
ModelSIMATIC IOT
CategoryIndustrial PC
LanguageEnglish

Related product manuals