Error using the DP_DIAG function

vinodv

Member
Join Date
Jan 2006
Location
Bangalore
Posts
2
Hi All,

I am new to PLC programming. I have a Siemens S7 Simatic CPU 315-2DP PLC. It is configured to work with a DP slave I/O. The entire configuration is working fine. Now I want to monitor the diagnostic data sent by the DP device. For that when i am calling the function "DP_DIAG" I am getting two compilation errors and a warning. I am doing the programming in STL.

Errors (2):
No PLC type descritpion found for called or addressed block FC 3

Invalid operation for CPLADDR


Warning (1):
No valid offline ASCII type description found for called or addressed block FC 3.


I created a shared DB for storing the diagnostic data. I am calling the function from OB1. The code for calling FC 3 is as follows

NETWORK
TITLE =
CALL "DP_DIAG" ( //FC 3 for DP Diagnostics
CPLADDR := W#16#0,
DTYPE := B#16#2,
STATION := B#16#40,
DIAG := P#DB1.DBx0.0 BYTE 20,
NDR := M 92.0,
ERROR := M 92.1,
STATUS := MW 93,
DIAGLNG := MB 95);


It will be greatful if anyone can tell me where I am going wrong???

regards,
Vinod
 
It looks like you are using source code programming. In order for the compiler to work, it must know the details of the blocks used in the compilation so I'm guessing you don't have FC3 in your blocks folder. To get it there open the Standard Library project, then open the Communications folder, select the block folder and then drag and drop FC3 from the library project into your project. You should then be able to compile your code.
 
Thank You Simon,

I tried what you said and it solved the problem. Now I am able to compile the code successfully. I am in the process of downloading the code to the PLC and testing if what I wrote is working correctly or not. Since I am new to PLCs I may get more doubts as I proceed. Expecting your help in future too.

Once again, thank you very much.

regards,
Vinod
 
vinodv

I have picked up on one or two things here....

1. You stated that you are using a 315-2DP, have you got a CP card in the rack? Because FC3 is used for reading DP diagnostics from a CP card, not from the DP port of the CPU. I can't remember the FC required off the top of me 'ead, I will have to look it up.

2. In your example you have the CPLADDR set as W#16#0, if indeed you do have a CP in the rack, then the CPLADDR will not be zero, you can get the address from the hardware configurator.

Paul
 

Similar Topics

Hello all, I'm new to this site. I have several Visual KV-10 16AT visual series that use the KL-N10V communications module to connect the Keyence...
Replies
0
Views
1,523
We just completed the conversion of a PLC 5/80 to a 1756-L8x processor. The old 5 program had numerous MSG instructions sending data to/from...
Replies
24
Views
9,498
Hi all, I recently had the following fault when opening a project in S7 - "Error (256:145) - The project or library was changed using tools of...
Replies
0
Views
3,211
Hi guys, I am a total newby in PLCs, and I am currently doing a project in RSLogix 5000, using RSEmulate to Emulate the PLC, details below...
Replies
11
Views
15,876
Hi I am trying to retrive RSLINX data from c#.net application. I have refenced my .Net application to Interop.RSIOPCAUTO.dll. But when trying to...
Replies
3
Views
2,579
Back
Top Bottom