Quantcast
Channel: All LabVIEW posts
Viewing all 202353 articles
Browse latest View live

saving picture

$
0
0

Hi, I have question about the labview program attached in the message. In this program I have three loops and four cases in each loop. I would like to save a picture or pdf every time I'm changing the case. The pdf also attached in the message. Thanks  


Error 91 occurred at Variant To Data in Queue Message Handler project

$
0
0

Good afternoon,

 

I have been working in a polarimeter, for which I am using two KDC101 motors and a power meter PM 100, all from Thorlabs. I based my program using templates in Labview: Continuous Adquisicion and Logging, and Queue Message Handler.

 

The problem I encounter is that whenever I press Exit or simply close the window, the program sends the error: Error 91 occurred at Variant To Data.This occurs even when I simply start the program and then press Quit. 

 

I already verify the tunnels in the case and all are properly connected. Even I explictly put the input for the stop of the loop for each case to be able to disable the Default if Unwired, nothing changed.

 

Then, I compared it with the templates and I did not see any big difference. As in the templates, I only use variants for the settings and for the Quit and Confirm Quit cases in the Message Handler Loop.

 

I would appreciate if you can check if there is something I am missing.

 

Thank you.

Re: Waveform+Chart+Array Average

$
0
0

wrote:

Sir, 

I misspoke earlier sorry. So we need to find the average of the data points that shows on the graph.
So, after we hit stop to button on the while loop, the loop should stop running and then we need to take the average of the data that were converted to Celsius and plotted on the graph. I think we need to create an array at the output and show all the points that were converted using a indicator and then take the average of it. i tried few different ways and keep getting broken wires. I really appreciate your help. Thank you again 


Technically what you have is a chart, not a graph.  Since what data is going into the chart depends on how long the chart history is, how much data is in your original array, and how many times you've wrapped around based on how long your while loop ran, the best thing you can do is take the Chart History property node of that chart which gives you the array of data that is in it at that moment, and take the mean of that.

Re: disable view as icon

$
0
0

Tools--> Options--> block diagram--> Place VI as ICON...disable that selection would gives you result.

 

HAV A GOOD TIME

Re: Waveform+Chart+Array Average

$
0
0

I think i figured it out this time. Thank you 

I am currently taking my first labview course. So i am all kinds of dumb mistake. I forgot to change my indicator to an array.

Also, i introduced the sequence structure cause my program was outputting average with every iteration of the loop. i wanted to do the sequence inside the loop. 

So sorry again. 

 

I do have one last question. If i wanted to change the plot line color and give the user the freedom to choose between two colors while the program is running. Which property node should i use? Should i use Enum control, if so how would i introduce blue and red color ?

Re: saving picture

$
0
0
  • What would you like to save a picture of?
  • It looks like you only have 1 loop, with 3 case structures in it.
  • Attach your code, not a picture of your computer monitor displaying the code.
  • Don't use a double as a case selector (notice the coercion dots)
  • Don't use a "not" on your stop button. You can click the condition so it stops when true instead of continues when true.
  • Use shift registers at the loop inputs and outputs.
  • Merge your error wires together

Re: How to replicate/duplicate sets of front panel controls and indicators?

$
0
0

wrote:

I tried the subpanels and have a couple questions. What is the procedure to center the controls in the subpanel?  What is the procedure to exchange data between the main block diagram exchange data the subvi?  See attachment with 3 methods: cluster, subpanel, and single front panel.


  • Make the SubVI window the exact same size as your subpanel. Then you can edit the controls and see how they will look at run time.
  • You can exchange data however you like. One possibility is to use a queue.

Re: How to replicate/duplicate sets of front panel controls and indicators?

$
0
0

You can even call it just like you would a normal SubVI with inputs and outputs using the Start and Wait on Asynchronous Call VIs.

 

Picture1.png


Re: saving picture

$
0
0

I attached my program code. the picture i would like to save is attached in the pdf file above. so in each case I would like to save test circuit 

Re: saving picture

$
0
0

I'm still a little confused, you want to generate circuit diagrams using LabVIEW?

Re: Help with Report Generation Tool kit

$
0
0

How many rows do you have? Can you transpose your data?

How to get a VI to communicate with a VI on another computer?

$
0
0

As a final project for a data acquisition I am developing a small meteorological station on one computer and getting it to communicate with another VI on a different computer, and I am lost as to how I go about doing that. I know about using shared variables to communicate across VI's, but I do not know how to use them to communicate across computers over a WiFi connection. 

Any help/advice would be much appreciated.

Re: How to get a VI to communicate with a VI on another computer?

$
0
0

I like to use the Network Streams, because the communication loss/recovery is kind of automatic. If you use simple TCP/IP VIs, you have to implement those features yourself.

Here is a description: http://www.ni.com/white-paper/12267/en/

cosmetic question

$
0
0

Hello!

I have a numeric control, it is a set for temperature . I have a processing time about 560 msec. 

At this time, I want to display the "wait" line instead of the control. I made the program. Maybe someone has better ideas?

Many thanks!!!

Re: Missing External Function : 2013 SP1 Application Builder

$
0
0

Problem: “Missing external function BScanDLL.dll”
Development computer
• Windows 10
• i7, 16 GB Ram
• LabVIEW Prof Dev System 2013 SP1
Target computer
• Windows 10
• i7, 16 GB Ram

1. I have a DLL built using MSVC 2017
2. The DLL works fine in development mode
3. It also works as an EXE on my development machine
4. I built an installer so I can distribute to other users. However, when I ran it on the target computer, I got the following error:  Missing external function BScan_DLL.dll.  I can see the dll in the "data' folder 


Re: Error 91 occurred at Variant To Data in Queue Message Handler project

$
0
0

A pet peeve around here is not attaching the actual code. While you can see some things in a picture you can't see other things eg. other cases in case structures, inside SubVIs or even code outside the picture (perhaps your "Acquisition" loop in this case) etc. You also can't play with the code in order to gain some native understanding of where the problem could be. Your trouble-shooting assistance will likely be limited and possibly not that useful without the actual code.

 

Having said that I see your Exit case is dequeueing some data from the "UI" queue and assuming its an error cluster - I assume that's where the error is being generated (via the error popup attached) since I believe code 91 is to do with the variant not being of the correct type. Presumably whatever is firing this Exit message to the UI queue is attaching the appropriate data?

Re: Connectivity Issues

$
0
0

I installed NI-VISA & i am still getting the same error. Do you know what else it could be?

Re: How to get a VI to communicate with a VI on another computer?

$
0
0

I second the Network Streams.  My second choice would be using the STM library, which is a library built on top of the TCP/IP API.  I despise Network Published Shared Variables (nothing but problems for me).

Re: eject USB device programatically

$
0
0

I know this is late for metzler, but may help others...

 

I did a search for command-line methods for ejecting USB drives, and ran across a PowerShell script that works (usually).  It can be converted to LabVIEW (I included the script and details for setting the ActiveX class in the snippet):

Eject Drive.png

Most of the blocks are off the Connectivity/ActiveX palette.  I don't know what '17' means.  And 'E:' is the drive I want to eject.

 

This is effectively the same as right-clicking the 'E:' drive in windows Explorer, and then clicking 'Eject'.  I have a virus scanner that takes over every drive I insert, so when I use this, I get a pop-up:  "'Removable Disk (ESmiley Happy' is currently in use...", but does give me a "Continue" button so I can eject it safely in spite of the virus scanner.  For many systems, it won't pop up anything, and the disk will disappear out of Explorer.  On my system, it disappears from the tree view, but not the file view for some reason.

 

Not perfect, but I like it better than pulling the drive without an 'eject' at all.

 

BTW, you're right to be concerned about Windows randomly accessing your drive.  Virus scanners (and built-in tools) do it all the time.  But most of them only read.  As long as it isn't writing, you're usually safe. 

 

FAT systems (most thumb drives) write to files using a method that is prone to errors.  They write the data in an unused area, then go back to a table of 'used' blocks, and records how to find each block of data.  If something goes wrong before writing the table ("File Allocation Table"), the last file written can be corrupted or lost.  If something goes wrong WHILE writing the table, a lot of files can get corrupted.  Luckily, there are 2 copies of the FAT, so if it messes up while writing one, the other should work as a backup...  'Should'.  Usually the write to the FAT (both copies) is so quick after the write to the data, that it's safe.  And the drive should know to finish writing one sector as the drive is being removed (see post before about power pins in USB).

 

Another issue with FAT is that many systems (I'm sure Windows does) write a flag saying it is 'dirty' the first time you write to it.  It doesn't mark it 'clean' till you 'eject' properly.  So every time you use the drive on a system configured to complain about dirty drives, it will ask to scan & search for issues.  Frankly, I haven't looked into it in a long time, so this might be obsolete.  From my experience, it looks like Windows marks the drive 'clean' after a while of no use.  So I don't get the 'scan & search for issues' pop-up very often.

 

Re: Connectivity Issues

$
0
0

Hi,

For Bug 1: Please check in MAX (Measurement & Automation Explorer) for the resource Availability.

COM Port.PNG

For Bug 2: Please check you have given valid key.Valid Key.png

 

Not Valid Key.png

 

 

Thanks,
Sanad MM

Viewing all 202353 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>