12-11-2013 07:13 AM
Hello. I am very new to LabVIEW programming.
I am using the NI 9425 with DAQmx. It is a digital input module and I continuous read the inputs (I would like to update only on input level change but it doesn't support it).
I use the DAQ assistant with these parameters:
- Acquire Signals
- Digital Input
- Port Input
I select port 0 (it is all 32 lines)
- Acquisition Mode: Continuous Samples
- Samples to Read: 1
- Rate (Hz): 3
When I create an indicator, I can see it works, although the update is not at 3 Hz, it is much slower.
What I cannot do, is give the output to individual LEDs, it needs some kind of conversion I am not familiar with.
When I am trying to put a conversion to Dynamic Data (as in picture) it does not work.
So far, two problems (slow update rate and not working with individual LEDs).
When I am not trying to do it with the DAQ assistant, I don't exactly know there right parameters to select.
You will find the pictures attached.
Thanks a lot.
Solved! Go to Solution.
12-11-2013 09:48 AM
Hi vakost,
show the full picture (or in other words: attach your VI!) to get some answers on the 3Hz sampling rate issue.
- Get rid of the dynamic datatype, you don't need it. There are functions on the waveform palette to handle digital waveform data...
- Get rid of the DAQ assistent. There are coming example VIs with LabVIEW/DAQmx explaining basic tasks like yours...
- Do you really need 32 individual boolean indicators? Why not use a boolean array?
12-12-2013 01:30 AM
Hello and thanks for the answer.
I am attaching the vi.
- Can you suggest any other functions for me to use in order to avoid the Dynamic Datatype?
- Why do you suggest to get rid of the DAQ Assistant? I have seen and use the examples but I find that there is no difference in the simple task I want to do.
- I don't want to use a boolean array (as in a couple of the examples) because I want to arrange the LEDs in different places in my screen and the LED array only places them in one row or column.
Thank you,
Vasilis.
12-12-2013 01:49 AM
Hi vakost,
I don't have DAQmx installed on this computer so I cannot check the DAQAssistent settings...
To handle the digital waveform array you get is quite easy:
You can use IndexArray to pick any element you need.
- Using plain DAQmx functions you might read your data as boolean array right from the beginning - no conversion needed afterwards.
- You might use a cluster of booleans for the frontpanel display. So you can work on boolean arrays in the block diagram and just convert to cluster for display: