07-23-2013 07:34 AM
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
Solved! Go to Solution.
07-23-2013 08:21 AM - edited 07-23-2013 08:23 AM
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.
07-23-2013 08:33 AM
Find attached example.
07-24-2013 06:04 AM
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.
07-24-2013 06:07 AM - edited 07-24-2013 06:08 AM
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!
07-24-2013 06:17 AM
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.
07-24-2013 06:19 AM - edited 07-24-2013 06:21 AM
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"...
07-24-2013 06:30 AM
Hi,
the examples don't work as I've got a digital input (here I use the express VI) and not an analog one.
07-24-2013 06:31 AM
07-24-2013 07:06 AM
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>