LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generate digital signal for 6722 or 6221

Solved!
Go to solution

 Hi,

 

first thanks for the help I already got on this board.

 

Now I've got the following problem:

I like to generate a digital signal: high for 300µs, low 300 µs, high 300µs, low 300µs, high for about 2ms.

 

I am looking for a solution how to generate this digital sequence. At the same time I will read the information back via an analog input (hopefully I have now a solution for this problem).

 

I tried to find examples but I wasn't successful. At the moment I was not able to produce any digital sequence which worked.

 

My hardware is either 6722 or 6221 - which should be OK regarding the timing.

 

Thanks

0 Kudos
Message 1 of 12
(2,511 Views)

Hi db,

 

create a DO task. Set sampling rate to 3333Hz (~300µs/S). Output a digital pattern of TFTFTTTTTTTF...

I would recommend to use th PCI6221 as I didn't found any useful information on DO sample rates for 6722 board on a quick search.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(2,503 Views)

Find attached example.

 

Create Digital Waveform


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 3 of 12
(2,499 Views)

Thanks for the help. Unfortunately, it does not work as shown therefore I used the Express-VI (I use 6221). Now I can generate a digital signal and by trial and error, the pulse width is OK for my sensor.

 

However, now I have got an old / new problem. I like to read the data back on the analog input of the 6221. At the moment I try to start the reading directly after writing sth. on the line. However, it does not work. The other possibility would be to read back all the time, but in both cases I need to measure a certain period.

 

So writing works but not reading. My signals are measured between Vcc and GND, so RSE should be fine.

0 Kudos
Message 4 of 12
(2,489 Views)

Hi db,

 

when it comes to synchronized DAQmx in/out operations you REALLY should go through all the available examples coming with LabVIEW/DAQmx.

 

There are several examples showing how to synchronize DAQmxRead and -Write operations. But in the first place: get rid of the "DAQ Assistent"-ExpressVI!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 12
(2,487 Views)

Thanks for the reply. I really searched through the different examples and I DID NOT find something usefull. The express VI simply works, the other stuff did not work! Probably, because my PCI 6221 does not support something.  However, the express VI is not the problem here (at least that's my point of view). The read-back does not work and here I do not use the express VI.

0 Kudos
Message 6 of 12
(2,482 Views)

Hi db,

 

the ExpressVI IS definitely a problem when it comes to synchronize two different DAQmx tasks!

 

In the example finder you will find a special folder of "DAQmx -> Synchronize". Start with "Multi-Function-Synch AI-AO"...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 12
(2,480 Views)

Hi,

the examples don't work as I've got a digital input (here I use the express VI) and not an analog one.

0 Kudos
Message 8 of 12
(2,475 Views)

Hi db,

 

as long as the board supports it you can exchange AI/AO/DI/DO for that purpose...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 12
(2,473 Views)

I tried again and again it does not work. I need sample "on demand" and I cannot choose that with the normal VIs. Unfortunatley, I cannot load up the picture. I should use Sampling "on demand".

 

In German it says:

Mögliche Ursachen:

Measurements: Gewünschter Wert wird für diese Eigenschaft nicht unterstützt.

Eigenschaft: SampleTimingArt
Angefordert: Sample-Takt
Mögliche Auswahl: On Demand

Task-Name: _unnamedTask<25F>

0 Kudos
Message 10 of 12
(2,469 Views)