LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Can labview display a histogram plot of data?

Thank you sir for your VI. it is realy show me new way of programming in labview. 

 

Can you plz tell me why you suggesting shift registers in place of Local Variable.

and plz guide me where to give data. bcoz it not update histogram every instance. i deleted fake data generation part and give there daq data.

i am using Flat sequence for whole code and i placed shift register on for loop from which i control how many time i read data.

 

thanks & regards,

0 Kudos
Message 11 of 19
(760 Views)

Please attach your code instead of long explanations. Maybe you made a mistake.


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 12 of 19
(747 Views)

hello.. here i upload my code. plz check this nad tell me more about shift register or any link and guide me to how can we optimize our code.

 

thanks & Regards,

0 Kudos
Message 13 of 19
(734 Views)
  • You data is only U8, so the possible histogram values can only be in the range 0 ...255. I don't see where you get 10 bits.
  • Why do you use a sequence structure? That us completely useless here! Delete it! Dataflow is sufficient to determine execution order.
  • Why do you configure the DAQ from scratch with every iteration of the loop? Configure it once before the loop, read inside the loop, and then close if after the loop.
  • Why do you have two seperate instances of the 1024 diagram constant. One is enough! Just branch the wire. Currently you need to make changes in two differnet places to modify the number of points. A maintenance nightmare.
  • Keep the summed data in the shift regsiter, not the averaged data. You run into scaling issues. Compare with my code! The lower shift register on the right needs to be fed with the wire after the "add", not after the division. Only divide for display.

LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 14 of 19
(724 Views)

thank you sir for yor suggestions but it's very helpfull if you can attach Vi of your suggestions. i am getting some trouble here or may be i am not understanding exactly. 

 

thanks n regards,

0 Kudos
Message 15 of 19
(693 Views)

What part of my answer is giving you problems?


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 16 of 19
(688 Views)

-----------------------------

  • Why do you configure the DAQ from scratch with every iteration of the loop? Configure it once before the loop, read inside the loop, and then close if after the loop.     

-----------------------------

 

how to do this? just using daqread only? 

 

-----------------------------

  • Why do you have two seperate instances of the 1024 diagram constant. One is enough! Just branch the wire. Currently you need to make changes in two differnet places to modify the number of points. A maintenance nightmare.

------------------------------

 

what does this mean?

--------------------------------

  • Keep the summed data in the shift regsiter, not the averaged data. You run into scaling issues. Compare with my code! The lower shift register on the right needs to be fed with the wire after the "add", not after the division. Only divide for display.

------------------------------------

as i said i am not understanding shift register exactly and i am not sure how it will behave after. does it behave like global variable in C..?

----------------------------------------------

 

0 Kudos
Message 17 of 19
(679 Views)

What if I have have 3 XY Graphs and I would like to link it up to the histogram showing all 3 XY Graph values? 

0 Kudos
Message 18 of 19
(414 Views)

Hi Lexenz,

I would recommend opening a new thread and asking your question. This will allow it to be seen by other members of the forum, and you'll have a greater chance of getting a response.

Also keep in mind the forum guidelines rule 3 and limit posting to extremely old threads.  

 

Regards,

 

Patrick B

0 Kudos
Message 19 of 19
(397 Views)