Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

modify variables in a smart camera by a remote computer

Solved!
Go to solution

Hi

I have a smart camera NI1722 and I want to modify some variables inside the camera by a computer which is connected to the camera.

 

Is it possible to modify variables inside the camera from a computer outside? On the computer we program with CVI. We have a RS232 and a TCPIP connection.

 

Does anybody can help us?

 

thanks

Oliver

0 Kudos
Message 1 of 6
(3,630 Views)
Solution
Accepted by topic author OZI

Hi Oliver,

 

Are you using LabVIEW or Vision Builder AI to program the Smart Camera?

There are multiple ways of exchanging data between a smart camera and CVI on the host computer.

The easiest way is probably to use shared variables.

If you're using LabVIEW to program the smart camera, the following article explains how to create and deploy shared variables on the target.

http://zone.ni.com/devzone/cda/tut/p/id/4679

 

If you're using Vision Builder AI, first connect to the smart camera, then select Tools>>Variable Manager...

Select the  System Variables tag, then click Add to create variable for the data you want to share. Make sure you select the Publish on Network checkbox.

You can set the value of these variables in Vision Builder, using the Set Variable step, located in the Additional Tools palette.

And many steps allow to use them directly in their configuration page, by clicking on the down arrow of some numeric controls.

 

Now, on the CVI side, this example shows how to connect to, read and write the variables that you created on the smart camera.

https://decibel.ni.com/content/docs/DOC-3806

 

Hope this helps.

 

Best regards,

 

-Christophe

Message 2 of 6
(3,620 Views)

Hi Christophe,

thanks a lot for this reply. I will check it immediate if it works and will tell you then the results.

 

btw: we use vision builder AI on the camera

 

Thanks

Oliver

0 Kudos
Message 3 of 6
(3,606 Views)

Hi Christope,

thanks a lot, it works. Great

 

Kudos Smiley Very Happy

 

Greetings

Oliver

 

 

0 Kudos
Message 4 of 6
(3,591 Views)

Thanks. Another way communicate between Vision Builder AI running on a smart camera and a CVI application on a PC is to drive Vision Builder AI using the VBAI API.

This API can be used in cunjunction with the solution that I posted earlier, and allows to silently (without showing the VBAI interface on the PC) control Vision Builder AI 2011.

You can open inspections, run them once or continuously, and retrieve results produced by each step (as well as global variables), and the resulting image to display in your CVI UI.

Examples of this API with CVI can be found here:

C:\Program Files (x86)\National Instruments\Vision Builder AI 2011\API Examples\CVI Examples

 

Give it a try if you're running Vision Builder AI 2011.

 

-Christophe

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

Hi

I am currently using VBAI 2010 with my smart camera and for exchange of variables I use the CNVCreateWriter function to communicate with CVI 2010. It is working fine when I am in the configuration interface. I can use and modify all variables without any problems.

 

but when I switch over to the inspection interface I can not modify the variables any more. By using the CNVCreateWriter function I get the error message:

 

NON-FATAL RUN-TIME ERROR:   "Camera_Api.c", line 130, col 14, thread id 0x0000107C:   Function CNVCreateWriter: (return value == -6345 [0xffffe737]). Could not complete operation in specified time

 

Does anyone know why it is working in the configuration interface but not in the inspection interface under real conditions?

 

by the way: I can not use VBAI 2011 at the moment because we have not yet a licence for it

 

thanks in advance

Oliver

0 Kudos
Message 6 of 6
(3,554 Views)