LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

1-d digital digital array to analog

Dear All,

I'm not professional in LABVIEW and you can consider me as a beginner. Regarding my problem I do have NI ELVIS II connected to the PC and using DAQ in LABVIEW to read 3 pins digital DATA and it is reading them perfectly. I was using the "Sample on Demand Option" and I used the "chart" to display my data after the conversion to number. Now I'm using an external clock so the output data type is different, the output is not a DIGITAL waveform, it is a 1-d array digital data. Now I want to take continously the three bits and convert them to a number to be plotted and the graph should continously ready my digital input and convert to a number (Like ADC). It is not working with Analog to digital converter block becuase my output is not a waveform, it is an array. Any help will be highly appreciated. One last note is that I can display the signal as three digital values on graph as zeros and ones, but I need them in numbers 0,1,2,3,4 ....,7 and it should be on a graph continously updated

Download All
0 Kudos
Message 1 of 12
(4,080 Views)
Hi bekh,

get rid of those express VIs, it will make your live a lot easier...
Why do you set a new dt in the inner loop?
In the waveform palette you will find a function to convert to a boolean array, just browse there with context help open!

You should learn about autoindexing in loops and how to enforce dataflow...
Best regards,
GerdW


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

Dear Gerd,

 

Thanks for your reply. I've actually tried the indexing options but non of them worked. Also regarding the boolean array conversion didn't work as well because the input should be a digital waveform not an array.

0 Kudos
Message 3 of 12
(4,034 Views)

Hi bekh,

 

as said before: you will find conversion functions in the waveform palette!

 

check.png

Best regards,
GerdW


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

Thanks a lot Mr. GerdW,

 

Can you please be more patient and help me a little bit more. I still can't do it my self. I don't even recognize the blocks in your picture. I've tried most of them and I need some kind of explanation if you can. Thanks again

0 Kudos
Message 5 of 12
(3,995 Views)
Hi bekh,

which functions don't you recognize?
There's one function from waveform palette related to data conversion, IndexArray and TransposeArray, and some simple stuff like loops and indicators...
Best regards,
GerdW


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

Dear Friend,

Can you please upload the VI file? before that I have think your blocks are working based on boolean array as an ainput, whuile my data are array of digital values. Still the indexing thing will work but I don't want to separate my vakues, the three bits in the array should be forming only one integer (number)

0 Kudos
Message 7 of 12
(3,931 Views)

@bekhkh wrote:

Dear Friend,

Can you please upload the VI file? before that I have think your blocks are working based on boolean array as an ainput, whuile my data are array of digital values. Still the indexing thing will work but I don't want to separate my vakues, the three bits in the array should be forming only one integer (number)


That png file is the code.  It is called a "snippet".  Save png file and then drag it from the containing folder onto a block diagram and it magically coverts into LV code!

 

The secret behind the "magic" is that a png file can contain additional information besides the picture, called metadata.  In a LV snippet, this data contains the necessary instructions fore recreating the code that the picture represents.  This has the advantage that it is real LV code, yet someone without LV installed can still at least see a picture of what the code is.  That being said, you should not ever attempt to edit a png file, as the metadata may become corrupt or deleted; the "magic" disappears.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 12
(3,922 Views)

Dear billko,

That's so helpful. I didn't know that. Thanks a lot

0 Kudos
Message 9 of 12
(3,879 Views)

Unfortunately it is done on earlier version of labview. The one I have is a bit old V 11.0.1 so I can't open the file. 

0 Kudos
Message 10 of 12
(3,875 Views)