LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

4X4 Array within Intensity Graph

Solved!
Go to solution

As I said, I cannot look at your DAQ configuration, and the use of dynamic data (which can be anything!) does not really help. Your express VIs are totally opaque to me, because I cannot look at them.

 

You seem to generate 4 bits of data into a boolean array (FFFF...TTTT) does this set the address of a single point you are trying to read with each iteration?

 

In this case you could do something like in the attached (look at the disabled case, you migh need a delay between the two express VIs)

0 Kudos
Message 11 of 26
(964 Views)

I don't have your Elvis kit, but have you checked to see if it's working right? Maybe swap the Arduino outputs between the Elvis analog inputs (making sure the data coming from each is unique). It could be that you're not getting any data into Elvis #2. Or read only from Elvis #1, then from Elvis #2 - perhaps that multiplexing isn't happening. The problem might not be in the wiring on this VI, but the inputs to it.

 

Cameron

 

One other question comes to mind (about your first problem, not the new one), why are you starting with a 1D array and then reshaping it anyway? Why not just nest a couple of FOR loops and fill the array directly?

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 12 of 26
(962 Views)

Hi Camerond, Thanks the 1st problem has now been solved. On the 2nd problem, everything is okay from the hardware side. I know this because I am getting readings from both analogue inputs on the NI Elvis Kit II (I know this because it shows on the normal graph indicator). But on the Intensity graph, only the data for Analogue Input 0 is showing and not analogue input 1.

0 Kudos
Message 13 of 26
(952 Views)

Hi altenbach.

 

Thanks again for your reply. I can see from your example that your intensity graph is filling up the full 4x4 array. I tried to substitute my DAQ assistants into it, but again no luxck! Sorry, I really am a beginner at Labview. I have attached some screenshots of my DAQ assistants to let you know the configeration (please see document explaination).  I have also added some info on the Arduino 4051, just to let you know how it works. Please let me know where are should subsitute my DAQ assistants into your code If you need anymore info then just let me know, thanks alot for your help!

0 Kudos
Message 14 of 26
(947 Views)

Just out of curiosity, could you just send a quick screenshot of your FP, maybe rearranging it a bit so we could see a snapshot of the first graph ("data"), the "output array" array, and the second graph ("Graph")? (I'm just a really visual thinker)

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 15 of 26
(945 Views)

Well, you seem to read 100 samples at a 4K rate. Are you averaging this for each single measurement to be added to the array? (how else do you want to fit 100 points ot a an array of size 16? 😮

0 Kudos
Message 16 of 26
(940 Views)

Yes, 100 samples are averaged for each measurement (and these are the default settings). So any ideas?

0 Kudos
Message 17 of 26
(921 Views)

You don't show any averaging in your code. Please explain.

0 Kudos
Message 18 of 26
(916 Views)

This part of the code is really irrelevant to my problem.  The sample average is automatically done within the DAQ Assistant, I do not need to do anything within the code. I could shorten the sampling to a much lower number and the same problem would occur.

 

The Problem is viewing results from Analogue Input 1 (or Voltage_1) on my Intensity Graph. I can see Voltage_0 on my Intensity graph but not Voltage_1. There is nothing wrong with my hardware because I can see the data on the normal graph indicator, but not in the Intensity Graph

0 Kudos
Message 19 of 26
(911 Views)

What do you see on the intensity graph? A single trace with all 16 samples or two traces with 8 samples each? You simply need to bring it in a form of a  16 element 1D array or a 16 element 2D array with two columns. Either can be reshaped into a 4x4 2D array for the intensity graph. You don't even need the shift register.

0 Kudos
Message 20 of 26
(909 Views)