Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate a pulse of 5 V -ve polarity in synchronisation with a 10 v input using PCI 6251 DAQ board

HI

I want to generate a 5V -ve polarity pulse to trigger my IEEE 1394 camera using an PCI 6251 (scb68 pin E) device, furthermore I am reading a standard Vsync signal from a SVGA port which is 10 v.
Now I want to synchronise the image capture of an IEEE 1394 camera with the Vsync signal so that camera is triggered to capture at every 4th Vsync signal (which is 50HZ.). Presently I am able to read the Vsync signal and also generate the -5 v signal But the Daq board generates a continues -5v signal while I want a 1 ms pulse (for every 4th Vsync).
Also this 5 v signal is generated even if the vi is stopped running.
Can anybody guide me so this problem can be solved.

Thanks a lot in advance

Shri
0 Kudos
Message 1 of 10
(4,673 Views)
Hi Shri,

This post is the same as your posts in several other forums, which I presume you have seen the answers too. Do these answers solve your problem, if so then that is great. If you are still getting issues then please let me know and I will be more than happy to help.

Best regards,

Peter H.
Applications Engineer.
NIUK.
Message 2 of 10
(4,670 Views)
Hi Peter H

Thanks for noticing

Some of the answers were helpful in pointing me to right direction, But! Yes I still have the same problems and I would be grateful if you could help me in this matter.

Thanks
Shri
0 Kudos
Message 3 of 10
(4,663 Views)
Hi Peter H

I would like to add one more point to my previous questions, while generating outputs (analog and counter) from the PCI 6251 SCB 68 board I found out the connection pins keep on emitting signals even if the vi has been stopped running. (I found out this by measuring the signals coming out from the connectors using a multi-meter) Is there a way to stop these signals when the vi stops.

Thanking you
Shri
0 Kudos
Message 4 of 10
(4,649 Views)
Hi Shri,

Are you stopping the DAQ task when you are stopping the loop (using the DAQmx Stop Task.vi)? If you don't do this then the signals will carry on after you have stopped the loop.

With regards to getting the 1ms second pulse signal, this should be fairly easy to achieve. Could you post your code here and I will take a look at it to see why it is giving continuous voltage rather than the pulse signal you want.

Best regards,

Peter H.
Applications Engineer.
NIUK.
0 Kudos
Message 5 of 10
(4,644 Views)
Hi Peter H

Yes I have used stop task vi to stop the tasks but even then I am getting the same problem.

I have attached the code along with this post. Also I would like to ask how should I attach this code (cleared of all problems) to the normal Image capture vi’s. i.e should this code be called into another vi or should the image capture code for IEEE 1394 be used in the same code, what would you suggest would be faster.

Thanking you

Shri
0 Kudos
Message 6 of 10
(4,636 Views)
Hi Shri,

I have managed to get a 1ms pulse every 80ms (every 4th period of a 50 Hz clock). To do this I just changed the high and low times around to get it to work. I have also added in a DAQmx Channel Property node to set the idle state to low instead of high so it doesn't keep emitting a 5v signal after you have stopped executing.

With regards to your question about how to integrate this code into your IMAQ vi's, calling code from a sub-vi is generally faster and more memory efficient to execute. It also makes your code easier to understand and more flexible if you break it up into logical blocks like this.

Hope this helps.

Best regards,

Peter H.
Applications Engineer.
NIUK.
0 Kudos
Message 7 of 10
(4,612 Views)
Hi

Thanks for your help, but I am using Labview 7 while the file you attached is in Labview 7.1, due to which I am not able to open it, so if it is possible can you please change it to Labview 7 and attach it again.

Thanking you
Shri
0 Kudos
Message 8 of 10
(4,601 Views)
Hi Shri,

Here it is in LabVIEW 7 format.

Best regards,

Peter H.
Applications Engineer.
NIUK.
0 Kudos
Message 9 of 10
(4,598 Views)
Hi Peter H

Thanks for the File

Now I am encountering a new kind of problem, as you know I want to capture one image for every trigger signal (i.e. 12 images per second) but the camera only reads the first signal and stops. And if I put the acquisition vi’s in a loop it captures images randomly (i.e. it skips trigger signals). I think my basic problem here is that I want the camera to complete acquisition before the next trigger is read and that too continuously or at least for 10 seconds.
What would be the best way to over come this problem? Or if possible can you send me an example that shows how to accept triggers continuously for image acquisition.

P.S. I have already adjusted the attributes of camera like shutter setting to fit inside the trigger interval.I am using Sony(DFW-X700) IEEE 1394 cammera which accepts triggers in Mode0.

Thanking you
Shri
0 Kudos
Message 10 of 10
(4,590 Views)