09-28-2012 05:08 AM
Hi
I'm new to Labview programming and I was a little confused with the VI I have. After reading almost 50 different tutorials regarding real time display, I have no idea how to implement a waveform function on the VI I have. The VI provided below do not have two files that is required to run it properly. All required files are in a hardware in which I do not have access to it at the moment.
So my question is how do I go about it? Do I stick a Daq assistant somewhere in the block diagram? I know I need to put the waveform function somewhere in the block diagram but after looking at the VI I have, I was confused. Any help would be very much appreciated!
Thanks for reading.
09-28-2012 07:31 AM - edited 09-28-2012 07:37 AM
@UnknownX wrote:
Hi
I'm new to Labview programming and I was a little confused with the VI I have. After reading almost 50 different tutorials regarding real time display, I have no idea how to implement a waveform function on the VI I have. The VI provided below do not have two files that is required to run it properly. All required files are in a hardware in which I do not have access to it at the moment.
So my question is how do I go about it? Do I stick a Daq assistant somewhere in the block diagram? I know I need to put the waveform function somewhere in the block diagram but after looking at the VI I have, I was confused. Any help would be very much appreciated!
Thanks for reading.
DId you try any examples coming with the LabVIEW basics?. What do you mean by real time display? do you have a RT hardware or you are running with only the host computer. If you use a hardware defently you need to use the DAQ functions and the indicators you can hook up to the waveform indicators.
I would suggest instead of going further more tutorials you can try to look into the LabVIEW examples that comes with the base package.
(I am not sure how long you took to read 50 tutorials in my whole LabVIEW carrier I haven't gone through a single tutorial completely 🙂 )
09-28-2012 09:39 AM
If I understand your request you just want to display your measurement on the front panel at run time, right ?
If so look at your while loop where most of you code is.
Then on frame 6 of the sequence structure.
In the true case.
In the frame 1 of the new sequence
Then in frame 0 of the last sequence
There you have your measurement step.
Drop a waveform graph on you front panel and connect the 2D array to it.
Each time a measurement will be done it will display on the graph in "real time".
09-28-2012 09:21 PM - edited 09-28-2012 09:22 PM
@ P@Anand
Thanks for the advice 😄
I have tried many labview basic examples and is easily understood. The design I have was made by my colleague and I'm required to stick a waveform indicator on the front panel. From what you said, if I stick a waveform indicator and wire it to the Daq does it work?
This design is to collect data from an engine. As far as I know there is a separate hardware in the Lab in which I do not have access to it. I believe that hardware will make the design running. I have absolutely no direct communication with my colleague so that's the reason I was left confused. I really appreciate if you can direct me. Many thanks for replying to this topic!
Cheers
09-28-2012 09:26 PM
Yeap! My task is to show real time display on the front panel.
I'm sorry but I was a little confused with what 'frame' means. Is it the box with the 'true'? And I have absolutely no idea what it does. I tried to search for its functionality but did not find any? Would you mind explaining it to me in details but make it simple because I am new to this software. 😄
If you can do it in visual for me that would be greatly appreciated!
Thanks for reading!
Cheers
09-28-2012 10:04 PM
I would give very serious thought to rewriting this code. The over use of sequence structures not to mention sequence structures within sequence structures will make this code a nightmare to maintain and extend. I would suggest you look at the examples for the state machine architecture. Another good architecture is the producer/consumer whicho would help you update the display while collecting the data. The producer/consumer would consist of two (possibly more) parallel loops. One loop handles the UI and the other handles data collection and processing. As data is collected it gets passed to the UI task. This is generally done using queues, notifiers or user events.
09-28-2012 10:36 PM
Thanks for the reply. The code was written by my colleague and is use to collect data from an engine. My task is to display a real time display on the front panel. So as suggested by the two forum member above your post, connecting the waveform indicator to the Daq will display real time display? Or there is more to do before a waveform actually appears on the graph panel?
10-01-2012 09:53 AM
@UnknownX wrote:
Thanks for the reply. The code was written by my colleague and is use to collect data from an engine. My task is to display a real time display on the front panel. So as suggested by the two forum member above your post, connecting the waveform indicator to the Daq will display real time display? Or there is more to do before a waveform actually appears on the graph panel?
Yes, what as suggested would probably work. However to be perfectly blunt this code is pretty bad. Also, depending on how fast you are collecting data updating the display in the same task as the data collection may impact your performance. In the long run you would be metter off to change the architecture (and quality) of the code. As I suggested it is generally better to have a dedicated data collection task and a separate task for handling the UI.
10-01-2012 09:58 AM
Hello UnknownX,
Drop a waveform graph or chart on your front panel and connect the 2D array coming out of the measurement step. That should be all you need to do. Every time the frame executes, it will display data on the front panel.
Best Regards,
Alina M.
Applications Engineering
National Instruments
10-02-2012 08:30 AM
Thanks all for the reply.
Appreciated!
Cheers