Siemens to Cognex Native Commands

JDCROCKETT724

Member
Join Date
Jun 2010
Location
Michigan
Posts
249
I have an in-sight cognex camera connected via profinet, and it is up and running perfectly. However, for reasons too long to explain, I need to send a cognex Native Command to the camera to write to a specific cell. I have done this with an AB plc using the Message command, but I am looking for a means to do the same thing with the siemens PLC. I have tested this with a hyper terminal with success. Anyone have any insight on this? Pun intended.
 
I believe you can establish a TCP connection to the insight and then send the native commands to it.
 
I have tried this with limited success. I was able to establish the TCP connection and read a string from the device. The string was basically asking for the user, but it would not take any commands that I send to it to mimic the hyperterminal connection I can make with it. Attached is the pic of the hyperterminal session I made with it. I got as far as the "Welcome....User:" My TSEND commands were going through without error, but I did not get a prompt for the password. I have tried sending "admin" and "admin$R" without success.

insight.jpg
 
I've had success in a similar situation by sending the username and password all at once, separated by a carriage return then a linefeed character. So you would send "admin\r\npassword\r\n". If there's no password then it would just be "admin\r\n\r\n".
 
I would think through profinet that the Q outputs could write to cognex parameters
Of course I haven't looked at gsd file or any manuals

Look over the T blocks in S7 (TSEND,TRCV and TCON)
These are the open TCP blocks
 
Sounds right JRW, there should be something available in the Profinet Q image to send these commands.
 
MTS nailed it. I sent the command "admin$R$L$R$L" and it replied back that I was logged in. From there I could send the native commands. Cognex is trying to figure this one out for me too. I think I won't tell them I have to see if they can come up with a better way. It would be nice if I could skip the whole login stuff.
 
Any communication with the Cognex In-Sight Cameras via native mode requires user and password. Is there a specific reason you chose to use native mode commands to write to a cell? Cognex has Profinet communication functions. This will not require the username and password.

Use the functions - FormatInputBuffer and ReadProfinetBuffer.
for writing Cognex to Siemens use the functions FormatOutputBuffer and WriteProfinetBuffer.

You will need to add the Camera as an I/O device on the Profinet Network. Look in the In-Sight Explorer Help under Communications Reference - Profinet Communications. There is a walk thru.
 
Yes, I am using the Native command to push in exposures for my 32 inspections. We are using the profinet for all other functions. The down side is, the exposure value needs to already be in place for the inspection. We used soft events to do this, but the soft event was taking too long since it still runs the spreadsheet. The native mode is more instant and gives me feedback that the command was accepted. The soft event was taking any where from 200 to 500 ms which may not seem like too much, but when you add that up with 32 inspections in my cycle then it comes out to a big chunk of time wasted.
 
ControlLogix Native CMD to In_Sight 7000

Hello, I am currently having trouble with the same thing you were trying to accomplish. I am just trying to push a number into a call to be used for exposure. I have followed all of the documentation provided to me precisely and I keep getting an error in my message command "error processing connection related service". I tried a GV command to get the value from a cell and that works, just can't get an SF or SI to work.
 

Similar Topics

Which signals do I have to use to get data from camera. For example camera detects a defect and sends signal to controller. Power cable: CCB-PWRIO-05
Replies
1
Views
178
Hi everyone i want to ask if i can connect Congnex Emulator to Siemens Tia portal? but without Cognex Camera.
Replies
0
Views
512
I am having some issues in the profinet functionallity, when I put the camera in offline mode from the insight software it puts my processor in...
Replies
2
Views
3,792
Hiya, Im triggering a cognex camera by a sensor and from then on i want my In-Sight Explorer program to do something and have an output string...
Replies
2
Views
6,619
I've got a Cognex In-sight camera setup with OPC to WinCC Flexible RT. Works good without any trouble however I don't have a way to display the...
Replies
16
Views
11,545
Back
Top Bottom