Menu

#13 Segmentation fault and Timeout daveReadbytes and daveGetU16

v1.0 (example)
open
1
2015-08-11
2015-08-11
Clive
No

Hi,

I am using libnodave on Linux system, to read/write data serially using PPI/RS232 cable between PC and PLC S7-200. I have managed to start/stop PLC and writebytes to PLC. BUt for some unknown reason I did not manage to read bytes. I have used libnodave version 0.8.5.1 using c programming language. when I do the following call I always get a segmentation fault on daveGetU16(dc) function call..

                        res=daveReadBytes(dc,daveOutputs,0,0,1,NULL);
                          read_buf[0]=daveGetU16(dc);

Also if I follow the following call format still I am not able to read any bytes from PLC. I always get timeout error.

                        res=daveReadBytes(dc,daveOutputs,0,0,1,read_buf);
                        printf("cnt=%d,res=%d, Reading_Memory BUFFER=%d \n",cnt,res,read_buf[0]);

 DId anyone make the readbytes function work on LINUX with S7-200 PLC using C programming language? Any suggestions ?

 Thanks for your help. Appreciated.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.