LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Task to generate a 1 Hz square wave using NIMax on a port line?

Is there a way to internally set up an NI Max Task to generate a port line toggle (i.e. port1, line0) as a toggling square wave?   

 

I know I can do this manually in NI Max by manually clicking on the port1 line0 output pin.  There must be a way to set this up as a task and have it run.   This doesn't even have to run continuously, just a few seconds toggling at about 1 time per second.

 

Any hints or suggests or an example that might show how to do this would be greatly appreciated 

0 Kudos
Message 1 of 3
(190 Views)

Double posted at https://forums.ni.com/t5/NI-TestStand/Use-NI-Max-to-generate-a-port-line-i-e-port-1-line0-toggling/m... 



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(156 Views)

Making something that "ticks" a square wave at 1 Hz is pretty trivial -- think While Loop with boolean shift register with a 500 ms "Wait" inside and a "Not" on the Boolean  line -- its output will be a 1 Hz square wave.  You can "clamp" the output at 0 if a Boolean control "Run" is False.  Now pass this (controllable) 1 Hz square wave (scaled as appropriate) to generate the square wave voltage you want.  Nothing fancy required (but you could certainly use an FPGA if it is available ...).

 

Your request seems (to me) to be pretty simple.  If so, no need to make a complex algorithm.

 

Bob Schor

 

 

0 Kudos
Message 3 of 3
(110 Views)