LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

square wave digital signal

dear all,

 

i am trying to generate two square wave signals where they are out-phase. i am struggling to feed the digital signals that have been generated to the daq system to open and close two valves through the mechanical relay. i have attached my file. Any help will be appreciated.

 

regards, 

Khalid

0 Kudos
Message 1 of 6
(2,685 Views)

Try making your DAQ Assistant to be N samples rather than 1 sample.

 

Because is it 2 channels, 1 sample, it is looking for a 1-D array.  But you are giving it 2 channels, multiple samples which is a 2D array.

0 Kudos
Message 2 of 6
(2,656 Views)

thank you very much for your reply. I have done what you have mentioned above, but the problem appears form the external clock should be identified as i am using PXI 6229. i have tried to select different type of external clock but does not work. could you please guide me.

 

Khalid

0 Kudos
Message 3 of 6
(2,587 Views)

It seems like you didn't do what RavensFan said - all you need to change (at least, to get it working) in your first VI is the sample mode in the Express VI (DAQ Assistant).

Double click on the Assistant to open the configuration, then change "Generation Mode" from "1 sample - on demand" to "N Samples".

I'd also suggest changing the number of samples to match your sampling settings at generation, and using only a single control (not two).

 

You can wire these values into the Assistant too, like this:

generate square wave.png


GCentral
0 Kudos
Message 4 of 6
(2,569 Views)

You can actually use just a single Digital Waveform generation too, if you want:

generate square wave_BD.png

 

Note the snippets are saved with 2019, so you might not be able to open them. The VI I attached to the previous post is backsaved to 2018, which appeared to have been the source version.


GCentral
0 Kudos
Message 5 of 6
(2,567 Views)

Firstly, I would like to thank you all for your help


The test rig that i am working on have a PXIe-1095 and I am using an M Series. National Instruments PXI-6229 Multifunction I/O Module to generate digital signals. It has been mentioned in the manual the device does not have an onboard timing engine for digital I/O. Therefore, i need to identify the clock source to send the digital signals. what I should to do in this problem. Please see a screenshot attached, I get this error.

 

 

0 Kudos
Message 6 of 6
(2,558 Views)