LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using PFI output as static line and then pulsing.

I would like to know if it is possible to use a PFI output on a USB-6212 as a static output and then pulse the output?  I am using the output as a control to a switch and need to generate a pulse to interrupt the switch.

 

Thank you

John

0 Kudos
Message 1 of 9
(4,232 Views)
Hello John,

Yes, it is possible but keep in mind that the digital lines of the USB-6212 are restricted to software timed operations. If you need a hardware-timed pulse you will need to use the device's counter(s). 
Message Edited by ManLongAtNI on 06-01-2010 05:12 PM

Regards,
Glenn
0 Kudos
Message 2 of 9
(4,184 Views)

Thanks, could you give me some steps or an example? 

 

I am using CVI 9.1.

 

Regards

John

0 Kudos
Message 3 of 9
(4,181 Views)
Hello John,

There is an example called WriteDigChan.prj that shows how to write to a digital channel. This example can be found in the NI Example Finder when you Browse according to: Task, under Hardware Input and Output>>DAQmx>>Digital Generation. Just use the DAQmxWriteDigitalLines() function to toggle the line of interest. 

Regards,
Glenn
0 Kudos
Message 4 of 9
(4,158 Views)

Maybe my question was not clear.

 

I need to use the digital line as an on/off signal that drives a FET.  When the line is low the FET is OFF, when high the FET is ON.  I need to pulse the line (while it is high) at various low pulse widths (from 10us to 10ms).  The FET is being used as a power switch that I need to interrupt by setting it low for the specified times then return high to keep power ON.

 

I know how to use the lines statically and how to use them to generate pulses.  Is there a way this can be done without doing a DAQmxWriteDigitalLines() to set it high or low and using Delay() for the pulse width?  The Delay() function is not accurate in the 10us range.

 

Thanks

John

0 Kudos
Message 5 of 9
(4,151 Views)

Hello John,

 

Can you clarify with an image of  pulse the line (while it is high) at various low pulse widths (from 10us to 10ms)?

 


Regards,
Glenn
0 Kudos
Message 6 of 9
(4,129 Views)

 

Glenn

 

I hope this clarifies what I am trying to do.

 

 

 

 PwrInt.JPG

 

 

 

Regards

John

0 Kudos
Message 7 of 9
(4,109 Views)

Hi John,

 


I know how to use the lines statically and how to use them to generate pulses.  Is there a way this can be done without doing a DAQmxWriteDigitalLines() to set it high or low and using Delay() for the pulse width?  The Delay() function is not accurate in the 10us range.

 

no software command will be guaranteed to work on such short time scales; instead you should consider using one of the two hardware timers of your instrumentation.

 

Wolfgang

0 Kudos
Message 8 of 9
(4,104 Views)
Hello John,

Wolfgang is correct, to get 10us pulse you will need to use the counter. For an appropriate example, reference the Example Finder, Hardware Input and Output>>DAQmx>>Generating Digital Pulses and reference the DigPulse.prj. Set the Idle State to High and define your pulse.

Regards,
Glenn
0 Kudos
Message 9 of 9
(4,030 Views)