01-21-2016 08:41 AM
Thank you Dave!
I'll try that! 🙂
02-18-2016 11:38 AM
After all your advices, I still have the problem.
Even in development mode, LabVIEW crashed. See attachement with the modified code and the crashing error.
Anybody has another solution? I'm kinda desperate hehe
Thank you
02-18-2016 12:26 PM
Did you remove all front panel bindings to your OPC Server? I would try a simple Vi and test writing to the OPC Server. Any reason you are using Global variables for your url for the data socket write? The concatenate strings function makes me wonder if the url name is properly formed.
For errors Check your windows event log for errors and your OPC error log if the Cognex OPC server has one. What OPC standard is the Cognex OPC Server?
02-18-2016 12:36 PM
Did you remove all front panel bindings to your OPC Server?
Yes
I would try a simple Vi and test writing to the OPC Server.
Since it crashes LabVIEW, I don't see the reason of doing this. What's you're idea behind that? Don't forget, it's intermittent.
Any reason you are using Global variables for your url for the data socket write?
It was just in case I wanted to use it somewhere else in my project. But right now it's the only location where I'm using it
The concatenate strings function makes me wonder if the url name is properly formed.
The contatenate strings are good. The crash is intermittent so most of the time it's working well.
For errors Check your windows event log for errors and your OPC error log if the Cognex OPC server has one.
There's no error in the Cognex OPC Server event log...
What OPC standard is the Cognex OPC Server?
This question, I don't know...?
02-18-2016 02:55 PM
IS it OPC compliment 2.0 , 3.0 ? Does it use Com or Dcom (Windows data Communication service) or OPC DA? Older versions use COM and DCOM. Newer servers us OPC UA ( for real time and does not use COM and DCOM so all the windows problems are eliminated. Need more info about your Cognex OPC Server.
02-18-2016 03:09 PM - edited 02-18-2016 03:24 PM
When we look into the software details, we can read:
The In-Sight OPC Server supports OPC Data Access clients based on versions 1.0, 2.0 or 3.0 of the OPC Specification
The In-Sight OPC Server installs and makes use of the following OPC Materials from the OPC Foundation:
OPC Foundation Core Components 2.00
OPC Foundation Data Access Automation 2.02
02-19-2016 12:38 PM
StephBeaudoin,
This definitely seems to be a tricky hang to track down. The lack of an actual crash and resulting crash log reduces the level of insight we have in troubleshooting. The main point for issues like this one is to try and pull out any patterns that might exist with the crashes. You mentioned in an earlier post that it happened after 800 writes. Is this normally true? Could you track the number of datasocket writes using a front panel indicator, and then run the program a few times? If this is only happening after a long duration of program execution (either clock time or iteration count), it might be indicative of some sort of memory leak….although normally memory leaks manifest themselves in the form of real crashes as opposed to hangs.
02-19-2016 01:39 PM
I said that it happened after 800 times, yes, but sometimes it's way less than that. Doesn't seem to be a memory leak.
What I know is that it's always the same OPC variable. This variable is not one that we have created in the OPC Server, it's an existing variable from Cognex (like a system variable) that is used to trig the camera. I really need to use this variable, there's no other way to trig the camera (not even with a created variable).
My client is starting to be upset about this. But since I don't have any log/error code to help me debug, and there nothing on Cognex side, it really looks like it's on LabVIEW side....
Thanks again for helping me
Stephanie
02-22-2016 05:25 PM
Stephanie,
If this is only happening when trying to access a particular OPC variable, chances are it's something specific about that variable.
What are all the programs using / depending on this variable? What does the full pathway look like? E.g. LabVIEW writes a value to it on the Cognex OPC server, then x does y to it in order to send it to the camera, etc.
03-08-2016 09:49 AM
Hi!
I think I've found the solution, but I don't understand why this is working!
So in my first iteration, I've used a control in the Front Panel linked to the OCP server variable and used a Property Node in the block diagram to get its URL. Then used DataSocket:Write to send a data. This iteration intermittently crashed my application.
Second iteration, I've used only the DataSocket:Write with a constant for the URL. This iteration intermittently crashed my application.
Last iteration, I've used a control linked to the OPC server variable... and this one worked!
Please someone, tell me what's the difference between a DataSocket:Write vi and a variable binded to an OPC server variable.
Thank you,
Stephanie