From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Programming

Hi Teddy,
 
You can read from a Local Variable of the Graph prior to plotting anything to it.
If you have previous plot in the graph, it will return what you plotted down previously.
If you don't have anything, it will return an uninitialized array.
 
Then, you can feed this array to a For Loop with Auto-indexing.
If the array is initialized, the For Loop will execute twice (since the array has two elements) and return a Boolean array [True, True].
If the array is uninitialized, the For Loop will not execute (since the size of the array is 0), and it will output False (the default value of Boolean data type).
 
After that, by converting the Boolean array to number, you will get 0 if there is not previous plot in the graph, and non-0 if there is any plot.
And you can wire this value to a Case structure for any codes that follow.
 
Hope this helps.
 
Guo Min
Applications Engineer
National Instruments ASEAN
0 Kudos
Message 11 of 35
(1,232 Views)
Hi Teddy,

In LabVIEW, there is no way to change the color of the cursor name independantly of the cursor's color, since they are bundled as one.

If you really need to do this, the only way I would suggest is to create two separate cursors, one not showing the cursor name and one with the cursor name.
Then you will be able to change the color separately, and you can use the property node to synchronize the position of the two cursors.

Guo Min
Applications Engineer
National Instruments ASEAN
0 Kudos
Message 12 of 35
(1,204 Views)

Hello

 

Thank you for all the help. I have another question. Suppose there are two arrays A and B.

A has values 1,2,3,4

B has values 2,4,6,8

 

And these two are plotted in an XY graph with A as x axis and B as y axis.

 

Is there a way to obtain the Y axis value when X axis value is 1.5? Technically the Y value should be 3. Is there a way to get this from the graph or from interpolating the arrays?

 

 

0 Kudos
Message 13 of 35
(1,188 Views)

Hi Teddy,

 

There are a few interpolation function on the functions pallet under signal processing » pt by pt » Interpolation. You could also use a function node and calculate the interpolated point yourself based on the signals characteristics.

 

But to answer your question, the graph cannot perform any of these functions. You will need an external function to calculate the interpolated point.

Sappster
0 Kudos
Message 14 of 35
(1,176 Views)

Hello,

 

Thank you for your reply. I also want to know about the Report generation Toolkit. I have it installed, but I am unable to see the VIs in the block diagram. Once the report gen toolkit is installed, where should I copy the llb file to be able to use the report gen toolkit?

 

Thank you in advance

 

 

0 Kudos
Message 15 of 35
(1,097 Views)

Hi Teddy,

 

Are you trying to install the toolkit to your LabVIEW 8.5? Do you have multiple versions of LabVIEW installed in your computer?

What version of Report Generation Toolkit did you install? Where did you get the installer file and how did you install it?

 

Normally after a successful installation of the toolkit, you don't need to copy any .llb files.

You will be immediately able to find the VIs in the Fucntions Palette>> Programming>>Report Generation

I suspect your problem may be a result of either installing the wrong version of toolkit or installing the toolkit to multiple versions of LabVIEW.

 

Best regards,

Guo Min

Applications Engineer

National Instruments ASEAN 

0 Kudos
Message 16 of 35
(1,072 Views)

Hello

 

Thank you for your reply. I will reinstall the toolkit and try again. I also want to know another thing. If I use the toolkit to generate a MS word document, can I open the created document and display the data in a strng indicator? Kindly attach a sample if possible.

 

Thank you

 

 

0 Kudos
Message 17 of 35
(1,049 Views)

Hello,

 

I would kindly like to know the following

 

1. How to display a picture on the front panel

 

2. Are there any more sound VIs similar to beep.vi? If so, from where can I get them?

 

Thank you

 

 

0 Kudos
Message 18 of 35
(1,006 Views)
Hi Teddy,
 
I couldn't find an easy way to extract the contents in a Word document, since the file contains a lot of formatting information.
You can try to open the file as ASCII (same as what you do to .txt files), and you will see the contents together with many "trash" information.
 
If the .doc file only contains tables, I would suggest you save these tables using Excel. In Report Generation Toolkit, you can find some functions under Excel Specific to do so. I've attached a simple example for this.
 
Nontheless, you can access the information in a .doc file by making ActiveX calls in LabVIEW to control MS Word, but it's more complicated and troublesome, and I wouldn't recommend it to you.
 
Best regards,
Guo Min
Applications Engineer
National Instruments ASEAN
0 Kudos
Message 19 of 35
(976 Views)

Hi Teddy,

 

Regarding your last post, please see below for answers.

 

1. To play other sounds, you can wire a False constant to the "use system alert?" terminal of the "beep.vi", and modify the frequency and duration of the sound you play. You can play more sounds using the Play Waveform Express VI located in Functions Palette>>Programming>>Graphics & Sound>>Sound>>Output, but you need an output device (speakers, etc.) to use it.

 

2. To display a picture, you can use "Draw Flattened Pixmap.vi" in Functions Palette>>Programming>>Graphics & Sound>>Picture Functions

If you want to display the picture from an image file like .bmp or .jpg, you can utilize "Read BMP File.vi" or "Read JPEG File.vi" in Functions Palette>>Programming>>Graphics & Sound>>Graphics Formats.

I've attached a simple example for displaying a .jpg image.

You can find more example codes using the Example Finder.

 

Best regards,

Guo Min

Applications Engineer

National Instruments ASEAN

0 Kudos
Message 20 of 35
(967 Views)