libnodave

toino2

Member
Join Date
Jun 2007
Location
Aveiro
Posts
12
Does anyone knows how to get CPU status of a simens using libnodave? Or does anyone knows a bit that is on while the CPU is on Run mode?
 
LIBNODAVE is a free library to communicate to Siemens S7 PLCs. I forgot to mention the CPUs. It is for the s7300 and 400.
Thanks
 
Commercial drivers for S7 300 has a function to read the status of the CPU. Are you sure this is not available in libnodave?
 
I´m not sure because there are some functions that the producers off libnodave don't explain very well. I'm a bit suspicious about a function named daveReadSZL but i can't make it work.
 
Just in case toino2 can't read German, the relevant point is probably that since version 0.8.2, daveReadSZL has gained a fifth parameter "buflen" of type INT in which the length of "buffer" (parameter 4) is passed over.
 
I've done it in VB6 and it works fine...

You must use daveReadSZL(PLC.dConn, ID, SLZ_index, buffer(0))...

where PLC.dConn is the pointer to your PLC connection, ID is the SLZ_ID (search on Siemens documentation the list of SZL_ID), SLZ_index what you want to read.....
If you try with ID=0019h (25 dec) you will read LEDS of CPU (SLZ_index = 0 means all):
on buffer you will receive:
0,1,0,0,0,4,1,0,0,5,0,0,0,6,0,0,0,B,0,0,
--|-------|-------|-------|-------|
--|-------|-------|-------|------ B,0 -> BF = 0 -> Led BF off
--|-------|-------|------ 6,0 -> FRCE = 0 -> led FRCE off
--|-------|------ 5,0 -> STOP = 0 -> led STOP off
--|------ 4,1 -> RUN = 0 -> led RUN on
--1,0 -> SF = 0 -> led SF off

bye

BR1
 
Thanks, I tried with VB2005 and the buffer is not exacly the same but with some tests i have been capable to extract the state of the run and stop LED.
 

Similar Topics

Hi I am trying to connect to a s7-300 with libnodave. I successfully connected to 1200 and a 1500. 1500 had to make some change in the hardware...
Replies
1
Views
1,394
Greetings everyone, I encounter a lot of problems to connect to the PLC. For a couple of days, I had to find by myself the port number ... For...
Replies
9
Views
6,807
Hi,I'm a beginner.I want to connect 1200 by libnodave .who can upload a simple example . About how to build communication and Write DB Values .Any...
Replies
4
Views
1,968
Hi All I want communicate PLC S7 300 by VB.net and use Libnodave pass usb mpi 6ES7972-0CB20-0XA0. Can do it? If can please guide me. Thank you.
Replies
0
Views
3,294
I coded this app using LIBNODAVE maybe some of you guys can test.. i used PLC siemens s7-1200 1212C images...
Replies
1
Views
3,278
Back
Top Bottom