Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital output on Smart Camera

Hi Everyone

 

I am using a NI 1764 Smart camera, with LabVIEW. I want to output the status of the test onto one of the Digital output available on the camera. How can I do that. Any example would be highly appreciated. I tried using the Signal IO vis under the NI-IMAQ section, but they seem to be more related to generating pulse trains.

 

Any promt help would be highly appreciated.

 

Thanks

Shane5ab

0 Kudos
Message 1 of 7
(4,876 Views)

Hey Shane,

 

You are actually going to want to use the example "LL Pulse Generation.vi"

 

While this generates a pulse "train" you can set the delay to 0, making it a 100% duty cycle, or a constant output. You could then set the  front panel up as shown below:



 

Basically, you will immediately start the constant pulse "train" and programmatically change the polarity from  low true to high true, depending on how you want it. You will then see your output on your ISO 0 (as I have it set up)

 

I'm pretty sure this will do what you want.

Message Edited by Chris_VH on 04-02-2009 03:45 PM
Chris Van Horn
Applications Engineer
0 Kudos
Message 2 of 7
(4,848 Views)

Hi Chris

 

Thanks for your help, I tried tried what you said, It does not seem to be working for me, I am not able to see any voltage out on the ISO Channels. You specified to use the pulse delay to 0, but in documentation of this VI, it says :

Pulse Delay is the desired duration of the first phase of the signal in seconds. If the Units specified are seconds, the Pulse Delay should be greater than 0. If the Units specified are Scaled Encoder, the Pulse Delay uses one cycle when 0 is specified.

I used this VI as it is with all the settings you specified, but does't seem to be going any where, did you tried this in your office ? 

One more thing, you said, I can change the status of the line programatically, How do I do this, Can you please guide me ? 

I am bit frustated with this, NI claims to have DIO on this unit, and there is no such thing called a VI, simple enough to Set Status ON and OFF for these units, as in case of cFP.

 

Any help would be more than appreciated.

 

Regards

Shane5ab

 

0 Kudos
Message 3 of 7
(4,834 Views)

Hey Shane,


No I haven't set it up here, but I might have to give it a go for you.

 

As far as programmatically changing the hi/low, you can see the polarity is just in a cluster, so you could just "bundle by name" the desired value of the polarity. If you need further help with that, let us know.

Chris Van Horn
Applications Engineer
0 Kudos
Message 4 of 7
(4,832 Views)

Shane,

 

I think all you need is IMAQ Trigger Drive 2.vi. This allows you to simply drive any line with either a constant or some internal signal (eg Frame Start). You'd probably want to toggle the "trigger drive" input between "Asserted" and "Unasserted."

 

See the attached screenshot:

 

Eric 

 

 

Message Edited by BlueCheese on 04-02-2009 06:26 PM
Message Edited by BlueCheese on 04-02-2009 06:28 PM
Message 5 of 7
(4,826 Views)

Hi Chris

 

Thanks for quick reply, Actually I wanted to know how can I change it on the run. 

Do I need to stop the pulse generation first and then change it or what is the way to do this. I would be very thankful to you if you can try this on the camera and let me know how to get this going.

 

Regards

Shane5ab

0 Kudos
Message 6 of 7
(4,824 Views)

Hi Chris

 

I tried your second approach, using the IMAQ Trigger Drive2.vi, At first instance it still won't work, but then I had a look into the documentation of this Camera, and found that these output work more like a relay and does not output any logic voltage if nothing is connected. So I used it as a Relay and all worked the very first time. I am now using Asserted and Unasserted to turn it On and Off.

Thanks for your efforts.

 

Regards

Shane5ab

0 Kudos
Message 7 of 7
(4,817 Views)