Step7 - strange problems with the SDB

RMA

Member
Join Date
Sep 2004
Location
North of Hamburg, Germany
Posts
2,052
I've got a production line station which has two Cognex cameras in it to check that components are present and correctly orientated. The second camera was only recently added and came prepared for use with a newer (and much simplified) version of the communications S/W. In order to get the camera up and running quickly, I originally used a copy of the older (more complicated and very uncomfortable) S/W and got things running OK.

Now a management decision has been made to upgrade all the newer cameras to run with the newer S/W, this includes the second camera in this work station. In principal, the modifications sound pretty easy - swap out the handling software FBs and modify the connection data in NetConfig so that the camera is accessed via its Port 3000 instead of Port 23. The changes seem pretty trivial and amount to not much more than 5 minutes work - modify the Port address in NetConfig, compile and save in NetConfig; into HW-Config and compile and save there then download to the SPS.

The main problem is that after this the older camera no longer responds, despite the fact that neither it's S/W nor its details in NetConfig have been changed! (The newer camera doesn't work correctly either, but that's secondary at the moment! :)). Using the compare blocks facility to check the differences doesn't bring much help either - a simple statement that the parameters for the object in Rack 0, Slot 4 (the CP343) are different!

Has anybody ever seen anything like this, and is there anyway I can get more info on the differences between the SDBs (I have in the past seen much more detailed info using compare blocks, but this time it's no help at all).

Cheers

Roy
 
RMA said:
The main problem is that after this the older camera no longer responds, despite the fact that neither it's S/W nor its details in NetConfig have been changed!
Can you fill in some more details.
How do you see that it does not respond ?
What method is used for exchanging data with the cameras ?
 
Communication is via Ethernet, in the old version of the program both cameras are accessed using the same CP343 control FB, with the new S/W, camera 2 accesses the CP343 via its own FB (which is actually just a copy of the first one, with a different FB number. This was done to make it easier to copy the new S/W between different production lines, so that the same FB/FC & DB numbers were being used).

Observing the camera in a VAT, you can see that although it's Online, it won't go to READY. Normally, (for example after a fault) you can force the camera to READY by setting the "Logon" and "SEND" Bits in the IDB. After modifying the SDB, this no longer works - even before swapping out the affected FBs & FCs.

I change between old and new versions of the S/W by switching between two copies of the affected FCs, then changing from old to new is simply a matter of commenting out the appropriate FC Call in the supervisor FC and changing the FB Call (also in the supervisor FC).

I've spent the last hour or so checking that in the process of modifying the copied FC I hadn't inadvertently also modified something to do with camera 1, but so far I haven't found anything.

Edit: in the meantime I've remembered that I can access the contents of the SDB folder by double clicking on the folder, so now I can have a look and see what the differences are.
 
Last edited:
Sounds like the communication in down. Go online in netpro there you can see the current status for the connection. I'm also guessing that you are using Ag_send/Ag_receive to send and recive data from the camera check if there are any faults from these blocks. Sometimes if the communication is down a switch from run to stop and run on the cp card helps. Also there is a ping function in the detailed diagnostics for the cpcard here you also get more information about each connection
 
That's the feeling I have as well, the question is why/how? We are using AG_SEND and AG_RECV, but they aren't showing any errors.

I'd forgotten about being able to go online in NetPro as well as the Ping function in the diags. I'll give that a try later on when I get a chance - because I stop the line in this condition I can only try things out during their breaks - doesn't exactly speed things up!

Thanks

Roy
 
I had a chance to look at things during the meal break yesterday evening, and it is indeed the communication which is not functioning. I didn't find an Online view in NetPro, but in HW-Config the Online view showed everything as being OK. However, the diagnostic module for the CP343 showed all the connections to be stuck in "active connection establishment in progress" mode.

It looks as though something with the CP343 has got its knickers in a twist, but how?
 
Making slow progress

We've got a maintenace shift this morning, so I've got a bit of time to look into the problem.

I went back to the older backup where the communication worked, modified the Port address for camera 2 there from 23 to 3000, compiled and downloaded the SDBs. This time the communication with Camera 1 remained intact, but a new problem has shown up with Camera 2. In the IDB I can see in the receive buffer that the Cognex Camera has responded to the first command with a "1" (meaning it has received and understood the command), but in the CP343's control FB the AG_RECV block is displaying a status of 8180 - communication in progress. As a result, the "NewDataAvailable" Bit is not being set so the Camera program is hung up.

A further problem is that I tried copying the SDBs from the older backup to the current version of the project (CNTRL_C, CNTRL_V after first deleting the SDB folder in the current version). "Compare Blocks" then told me that the online/offline data was identical, but when I opened up NetPro, it still showed me the old data! According to the Help files, you can Export and Import the SDBs, but they also explicitly state that you should not do this within the same project. Does anyone know what the easiest and safest way is to copy the SDBs from one version of a project to another?
 
One problem solved, one remains

The main problem with the Camera communication has been solved - it looks like the problem is an overloaded Ethernet, which, unfortunately, still has a mixture of 10 MBit and 100MBit devices on it. I've already seen this problem when I modified the stations to report when they went into Fault and the 10MBit stations were taking up to 90 secs(!) to get the message across.

I've still got the problem of how to copy the good, working, SDB folder from the older backup of the project to the current version. So if anybody has any suggestions there, I'd be more than pleased to hear them!

Cheers

Roy
 

Similar Topics

Hello guys, I have another, very weird problem with Step 7 functions. In the attachments, you can find sorces for OB1 and two functions. Both...
Replies
9
Views
3,454
First off, apologies for forgetting to switch to English before making the screen dumps! For those (few) who don't know: U = A SPB = JC...
Replies
14
Views
5,110
Hi, i am in the progress of familiarising myself with my new 315-2PN/DP. It is going extremely well, almost too well. Siemens manuals explain...
Replies
12
Views
6,466
This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
136
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
141
Back
Top Bottom