EasyManuals Logo

WAGO 750 Series User Manual

WAGO 750 Series
248 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 #189 background imageLoading...
Page #189 background image
Application Examples • 185
Example of Reading and Writing from the NVRAM
WAGO-I/O-SYSTEM 750
Linux Fieldbus Coupler
Example Program
#include <fcntl.h>
#include <stdio.h>
int main()
{
int i;
int file;
ssize_t sstmp;
char buf[2048];
/*Open Device*/
if((file = open(“/dev/nvram“)) < 0)
{
printf(“ERROR: Can’t open device
(\”/dev/nvram\”)\n”);
close(file);
exit(1);
}
/*Read Device*/
sstmp = read(file, buf, 8);
printf(“read %d bytes\n”, sstmp);
if(sstmp != 8)
{
printf(“ERROR: Reading NVRAM failed\n”);
}
else
{
printf(“read(%x %x %x %x %x %x %x %x)\n”, buf[0] ,
buf[1] , buf[2] , buf[3] , buf[4] , buf[5] , buf[6]
, buf[7]);
}
/*Trivial change of values*/
for(i=0;i<8;i++)
buf[i] += 1;
/*Write into Device*/
if(-1 == lseek(file, 0, SEEK_SET))
printf(“ERROR: lseek failed\n”);
sstmp = write(file, buf, 8);
printf(“Write (%d) bytes\n”, sstmp);
if(sstmp != 8)
printf(“ERROR: Writing into Device failed\n”);
/*close device*/
close(file);
}

Table of Contents

Other manuals for WAGO 750 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the WAGO 750 Series and is the answer not in the manual?

WAGO 750 Series Specifications

General IconGeneral
Protection ClassIP20
Bus CouplersPROFIBUS, CANopen, Ethernet
ModulesDigital Input, Digital Output, Analog Input, Analog Output
MountingDIN rail mounting
Voltage Supply24 V DC (typical)
Communication ProtocolDepends on the bus coupler (e.g., PROFIBUS, CANopen, DeviceNet, Ethernet)
Digital Input ChannelsVaries by module (e.g., 8, 16 channels)
Digital Output ChannelsVaries by module (e.g., 8, 16 channels)
Analog Input ChannelsVaries by module (e.g., 2, 4, 8 channels)
Analog Output Channels1, 2, 4 channels (depending on module)
Width12 mm, 24 mm (typical module widths)
Number of ChannelsVaries by module type
Current Consumption per ChannelVaries by module type

Related product manuals