LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph of intensity

Hello dear community,

 

I want to plot an intensity graph for the study of a transistor saturation like what you can see in the picture attached .

I writed a program but it doesn"t work, can someone please help?

 

You can find the program attached to this post

 

Thanks in advance for your help!

Download All
0 Kudos
Message 1 of 13
(3,304 Views)

Your code makes no sense.

 

  • You have 100 (10x10) array elements, but you are only iterating 10x.
  • With each iteration, you are acquiring 1k points on two channels in the range of -10V to 10V, but then reducing each channel to a single scalar used as an array index that can only be in the range of 0..9. Something gets lost there!
  • ....
0 Kudos
Message 2 of 13
(3,300 Views)

Thanks for your answer!

 

I want to have the values of my voltages into an array so that I can plot the intensity graph but i don't know how?

 should I read only one value each iteration?

I want my values to be Inside the array not just indices

 

I REALLY APPRECIATE YOUR HELP!

0 Kudos
Message 3 of 13
(3,256 Views)

Your current VI converts the dynamic data into a single numeric value via the convertir des donees dynamiques VI. You'll want to double click on that VI and change the setting to a 1D array of scalars.

 

What are you trying to do with the data from the Elvismx express VI though? Are you trying to build a 2D array where the X and Y values come from the two channels in the DAQ task and the Z values come from Elvis?

Applications Engineering
National Instruments
0 Kudos
Message 4 of 13
(3,249 Views)

 I m really sorry for the delay! I didn't get a notification..

 

Exactely sir, I m trying to build an array with X and Y coming from the two channels (voltages) and Z values (drain source current) so that I can plot the intensity graph.

 

Thanks again!

0 Kudos
Message 5 of 13
(3,230 Views)

An intensity graph is a 2D array and each element is defined by two non-negative I32 integer indices. You can get arbitrary axis by defining x0 and dx, which provides a mapping of real values to the indices of the 2D array.

In any case, you need to program your x and y values that they traverse all cells of the intensity graph, record the z value, and replace the value at that position. This is a simple task. What exactly is giving you problems?

If you don't have control over X and Y, things get slightly more difficult. You would initialize a 2D array of sufficient resolution, Convert x and y to array indices according to your desired mapping, and replace the value at that location. It is possible that some cells don't get hit or hit several times, so you need to define what should happen in these cases (e.g. initialize the 2D array with a sentinel value that means "no data" (e.g. NaN) and either use the last value or do some averaging if there are multiple values..

0 Kudos
Message 6 of 13
(3,220 Views)

Hello,

 

I created this new VI but it s not working!! 

 

I don't know why.

 

0 Kudos
Message 7 of 13
(3,195 Views)

@Abdou2018 wrote:

 

I created this new VI but it s not working!! 

 

I don't know why.

 


It is because you did not read or understand my post. You create a 2D array with three columns and 10 rows where two of the rows are x and y. Completely wrong!

 

  • I cannot look at your express VIs so I cannot tell how the DAQ assistant is configured.
  • What are the x and y values you are getting out of it?
  • Why is there even an inner FOR loop? Initialize a 2D array of sufficient size and suitable datatype before the while loop and put in in a shift register. Now replace z values based on the xy coordinates until all elements have been visited, then stop the loop

 

Do you have an array of typical outputs from your device?

 

Attached is a simple draft. You would need to modify it for arbitrary (non-integer) axis mappings to calculate indices based on x0 and dx of the axes. It is a simple linear relationship, you'll figure it out!

0 Kudos
Message 8 of 13
(3,187 Views)

Hello sir,

 

What do you think of the program attached her, is that good?

 

Thanks!

0 Kudos
Message 9 of 13
(3,144 Views)

@Abdou2018 wrote:

 

What do you think of the program attached her, is that good?

 


Does it work?

 

Some observations:

  • "index array" is resizable. You only need one instance.
  • Converting a DBL to U32 to be used as index is completely pointless. Just let it automatically coerce to I32. No conversion needed. Still, I suspect that x and y probably need to be scaled, but there is no way to tell.
  • It is completely pointless to maximize the front panel and diagram to the screen. During development and debugging, you often want to see both (e.g. probing, execution highlighting)
  • Why do you use an intensity chart and graph at the same time? Pick the right one!
  • You still only get 10 points, then start over with a zeroed array at the next iteration of the while loop. No data survives a while loop iteration except for the chart history buffer,but that seems completely useless here. That inner FOR loop is completely pointless. Initialize a 2D array of the right size outside the loop, place it in a shift register of the outer while loop, and keep replacing elements into the entire area is covered.
  • You still have a basic misunderstanding of what I described earlier. Did you look at my example?
  • What are typical xyz data? Can you stream a sufficiently large set to disk (3 columns, N rows) and attach it here?
0 Kudos
Message 10 of 13
(3,140 Views)