Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-1742 camera to Siemens S7 TCPIP connection

I'm trying to make a TCPIP connection from the NI-1742 camera to my S7-317-DP PLC with a CP343-1 LEAN. An "ACTIVE" connection between the S7 and the camera, camera having port 502, works. A passive connection however doesn't. PLC side- I configured an active connection both port 502 and 2000- where 2000(PLC side) is prefered. The setup, Camera side looks simple: with Vision builder (ver3.5.1) menu-TOOLS/Communication Device Manager/NewDevice(No other present) in the tab - New Communication Device: Protocol =TCP/IP Device Type = Slave IP Address = 10.159.140.236 (camera's own address is 10.159.140.202/255.255.255.0) Port = 502 or 2000 (tried both) PLC side (with netpro): Station (unspecified) Connection - Type : TCP-connection No check mark: Active connection (tab address) only Port is changed to either 502 to 2000 No parnter information (answers anybody) any answers thank you zan
0 Kudos
Message 1 of 7
(4,966 Views)

Hello Zvt,

        You posted a tremendous amount of information, so please be patinet and try to answer these questions?

  • Do you use Vision Builder for Automated Inspection?
  • Do you use Siemens PLC?
  • Do you use any OPC servers to connect to PLC?

         What's exactly your problem? is it releated to Vision or PLC connection?

          

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 2 of 7
(4,955 Views)
hi,
Do you use Vision Builder for Automated Inspection?
I have the Vision Builder for Automated Inspection version - 3.5.1
Do you use Siemens PLC?
yes, I have both 300 and 400 series PLC's.
Do you use any OPC servers to connect to PLC?
yes, 2 servers.

The problem lies in:
if the Camera is configured, using the NI-configuration program:
menu point - tools
sub-menu - Communication Device Manager
within the new window:
button - New Device
within this new window:
Protocol = TCPIP
Device Type = SLAVE
IP Addres = 10.159.140.236
Port = 2000
This doesn't work.
The PLC should be correctly configured.
0 Kudos
Message 3 of 7
(4,941 Views)

Hey zvf,

 

What exactly is the problem? Are you not able to send/receive commands from VBAI? do you get any errors?

 

Christian 

Message 4 of 7
(4,877 Views)

queHi Zvf, I think yourquestion is concerned with "PLC Connection with VBAI using TCP/IP". I don't see where is the rule of OPC server since you already address your PLC using Direct IP (not Channels, Groups etc...) [I might be wrong for that guess]

 

So, I think some experienced users or Vision Team should emphasis that if it is possible to connect PLC to VBAI and a simple walkthrough.

 

I lack this knowledge but keen to know how.

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

0 Kudos
Message 5 of 7
(4,859 Views)
hi, The OPC server is not the problem. For a standard S7-connection, to and from a S7-PLC, 1 partner must be "Active" the other "Passive". The Active partner makes the connection to the passive partner. If the S7-PLC is active and the camera is passive: using the VBAI menu point - TOOLS - COMMUNICATION DEVICE MANAGER then adding a "NEW DEVICE" - protocol is TCP/IP port is 502 this works. The PLC can connect to the camera. ------------------------------------------------- however, if the camera is Active and the PLC is Passive: using the VBAI menu point - TOOLS - COMMUNICATION DEVICE MANAGER then adding a "NEW DEVICE" - protocol is TCP/IP device type is slave <---!!! port is 502 ip address is 10.159.140.236 this doesn't work. the "Server status" i.e. "Start Server" button is not usable. later zan
0 Kudos
Message 6 of 7
(4,849 Views)
Hey Zvf, It's still very hard to find out what the problem is. However it seems that you mixed up something. The device you you configure in the VBAI is not the PLC, its the SmartCam. So when you set the "New Device" withing the Communication Manager to "Slave", then you set the SmartCame to slave, because of that the "Start Server" Button is disabled. So the whole thing is the other way round. For more information on how to configura a TCP/IP communication I would suggest to have a closer look into the VBAI help. You will find it also as a Tutorial under Start>Programms>National Instruments>VBAI>Documentation>VBAI Tutorial starting at site 141. Christian
0 Kudos
Message 7 of 7
(4,838 Views)