I found this page where there is an example for extract cell information from an Insight-Explorer but... what about to write into the cell from a c# application?
C# write cell to In-Sight Explorer (cognex)
3.1k Views Asked by Mak At
3
There are 3 best solutions below
0

You could use Native Mode Commands to set the value of controls in the spreadsheet in In-Sight Explorer (as discussed in the question you linked to). Note that you won't be able to write data to any cell - you will only be able to write to cells containing EditInt()
, EditFloat()
, EditString()
, CheckBox()
, etc functions. Send the commands as text over a socket connection to the cameras port 23. You will need to send a username and password to the camera when the connection is established.
0

If you're using the Cognex SDK, use the following functions
CvsInSight.SetFloat(...)
to set EditFloat control valuesCvsInSight.SetInteger(...)
to set EditInt control valuesCvsInSight.SetListBoxIndex(...)
to select items in list boxesCvsInSight.SetString(...)
to set EditString control valuesCvsInSight.SetCheckBox(...)
to change the state of CheckBox controls
If you want to control the cells in the current job file of an In-Sight camera using C#, here is the method that has worked for me. Please note, I'm using In-Sight Explorer v5.9.0, but I've tested this on earlier versions too and it still works.
NOTE: Without a Cognex In-Sight SDK license, you will not be able to run this application within Visual Studio. You will have to build the project and then run the executable directly.
NOTE: If you're connected to the camera with In-Sight Explorer when you run this application, the In-Sight Explorer will disconnect from the camera and then try to reconnect after your application has disconnected from the camera.