Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni 1744 camera programming with PLC

Solved!
Go to solution

Hi,

 

I have a N I 1744 camera. It scans the lenght and position of pins. There are several lenghts of pins. So there are +10 programs needed. The programs were made with NI Vision builder. The right program for the right pin is now inserted in the camera with visionbuilder. I was hoping to get rid of the laptop and be able to select the program with the installed S7-1200 PLC. It would save some time.

 

Would this be possible or is there any otherway to make an easier selection of the program?

 

Thanks in advance.

 

0 Kudos
Message 1 of 6
(5,163 Views)
Solution
Accepted by topic author LaurensDev

If I understand well, you want the PLC to tell the smart camera which program to load.

Vision Builder AI support different industrial communication protocols that can be used to communicate with a PLC, such as Serial, Ethernet, Modbus, Ethernet/IP and OPC UA.

You could also use I/Os and send signal from the PLC to the Smart Camera.

From Vision Builder, select View>>View Complete Inspection Setup.

Then select View>>Toggle Main Window View.

On the left toolbar that appears, click the Select Inspection icon.

Now Click on the Inspection Steps: Communicate tab from the palette on the right.

Select the step corresponding to the communication protocol you chose to use with your PLC, for example, TCP.

With this step, you want to read the command sent by the PLC.

Next, go to the Inspection Steps: Use Additional Tools tab. Scroll down and click on the Select Inspection step.

This step lets you specify which inspection to run based on the result of the communication step you just inserted.

Click Add to specify a new inspection. Specify a (Value - Inspection) pair.

Enable the "Enable Inspection Selection" checkboc and click OK.

Go to the VBAI inspection mode, and open an inspection.

When the inspection reaches the final state, the Select Inspection state will be run to see if a new inspection should be loaded.

 

Hope this helps.

 

Best regards,

 

Christophe

Message 2 of 6
(5,136 Views)

That was indeed what i was looking for. I will try this out asap. But if i'm not mistaken, this would still include having Vision Builder AI running on a laptop everytime there is a new program that needs to be load in to the smart camera. In other words, the PLC would tell Vision builder wich program to load and Vision builder would load it in the smart camera? So there is no way of storing the programs in the PLC so the PLC can load it in the smart camera?

 

Thanks alot for the help. If Vision builder would still be needed with your solution we can always install another HMI that has the possiblity of running Vision Builder.

 

 

0 Kudos
Message 3 of 6
(5,125 Views)

> But if i'm not mistaken, this would still include having Vision Builder AI running on a laptop everytime there is a new program that needs to be load in to the smart camera.

 

No, the PLC would communicate directly with the Smart Camera. The VIsion Builder AI program that you run on your laptop is used to configure the inspection and the communication between the Smart Camera and the PLC.

Once you setup Product Select as described, and start running the inspection in inspection mode, you can close Vision Builder AI running on the laptop. You will then get a message asking if you want to stop the program running on the smart  camera or close only the configurable interface running on the laptop (No, Close Only Option).

Once you close VBAI on the laptop, you can disconnect the laptop.

When using a remote target like a Smart Camera or Compact Vision System, the host computer or laptop is only used to configure the Vision Builder AI engine running on the smart camera or CVS.

 

Since you mention HMI, I want to point out that you can always create a Custom User Interface and publish it using the Smart Camera web server. You will be able to view and interact with that UI using a web browser from any other PC on the same network.

 

Hope this clarifies things. Let me know if you need more help with the PLC/Smart Camera communication. Which protocol would you think of using?

 

Best regards,

 

Christophe

0 Kudos
Message 4 of 6
(5,097 Views)

hi,

 

sorry for waiting so long to respond. We can't try it for the next few weeks. We will be working with RJ45.

I'll will get back to u asap. Thanks in advance for the help!

 

Kind regards,

 

Laurens

0 Kudos
Message 5 of 6
(4,984 Views)

ok 🙂

 

We are now able to send to visionbuilder and make the PLC select the required program.

 

For those interested. We are using TCP/IO.

In SIemens TIA Portal V12 we use the DB TSEND_C. We send chars to the camera.

Strings didn't work that well.

 

On the VBAI side we use all as allready said by ChristopheC above.

 

Thanks for the help!

 

Kind regards,

LaurensDev

0 Kudos
Message 6 of 6
(4,705 Views)