07-13-2018 12:55 AM
Dear ALL,
Hi there! I got 2 separated in the same block diagram which named digitaltask1 and digitaltask2, they both contain a wait node inside a loop for timing control. In order to make sure digitaltask2 work totally in the digitaltask1's high time, you can see the need is to change the timing analysis from equal to containing.(in the 1st picture, if we set timing A = timing B= 100ms, the next picture timing B should be contained in timing A)
Could anyone give me some suggestions on how to deal with it? What should I do to achieve the function? Thank you in advance!
Best,
Jason
07-13-2018 01:39 AM
If you'd like help with LabVIEW code, you should attach your LabVIEW VI so we can see what you are doing now!
07-13-2018 01:40 AM
Hi Jason,
I guess this is still related to your other threads about driving an external display using some DO lines…
You need to create your digital waveforms as needed:
- when B should rise AFTER A then you need to set B to TRUE one sample later than A.
- when A should fall AFTER B then you need to set A to FALSE one sample later than B…
07-13-2018 02:05 AM
Hi GerdW,
Thanks again! I learn a lot from you these days!
Yes, this question is linked to the design.
I understand your thought. Could you please show me a more detailed and specific introduction on how to do it usually in LabVIEW with DAQ?
Thank you so much!
Best,
Jason
07-13-2018 02:39 AM
Hi Jason,
this is no DAQ question, it's just a matter of how you are preparing your digital waveforms BEFORE outputting them using your DAQ device…
Just create those waveforms as needed. In the worst case you prepare a spreadsheet file with needed data "manually" and load that spreadsheet. (Just to be clear: with "spreadsheet" I mean CSV files.)
07-13-2018 08:28 AM
Just one quick precaution:
Your timing diagram shows some digital state changes happening on rising edges of the clock and others on the falling edges. Standard NI DAQ boards don't support this kind of "either/or" polarity for sample clocks. They'll only be able to generate new samples (and possible DO state changes) on one specific edge polarity. You can pick rising or you can pick falling but you can't pick both at once.
-Kevin P
07-15-2018 10:43 PM
Hi Kevin,
Thank you for your reply!
The more important part in this project should focus on sig1's high time contains sig2 as follows:
I am trying to achieve the follow function of B. The original one for now is A.
Could you give me some advice?
Thanks a lot!
Best,
Jason
07-16-2018 02:21 AM
Hi GerdW,
Thanks for your reply!
1.May I ask how to prepare the digital waveforms BEFORE outputting them using your DAQ device? Are there examples or snippets for reference?
2.How to prepare a spreadsheet file with needed data "manually" and load that spreadsheet?
Many thanks!
Best,
Jason
07-16-2018 03:06 AM
Hi Jason,
1.May I ask how to prepare the digital waveforms BEFORE outputting them using your DAQ device? Are there examples or snippets for reference?
2.How to prepare a spreadsheet file with needed data "manually" and load that spreadsheet?
The same way I did with that boolean array constant in the image!
Create a worksheet in Excel, fill in 0 and 1 as needed, then save the worksheet as CSV file. Load the file using the ReadDelimitedSpreadsheet function…
07-18-2018 10:20 PM
Dear GerdW,
Thank you very much for your time!
What should I do if the Leitung 0 and Leitung 1 are separated timing control for data and scan1a? How can I send the prepared digital waveforms to the DAQmx Timing?
Many thanks!
Best,
Jason