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

Re: Repeated running record and play from WaveIO gives error -5

$
0
0

Hi Rajesh,

 

Thanks for posting the code. I don't have access to VeriStand (and I think there are a few missing VIs too), but can see how it should all work.

 

For glitch-free, continuous audio output you'll probably need to separate the WaveIO code into a subVI running in parallel, and have it run using a higher thread priority and a different execution system. Apart from a larger audio buffer, these execution settings seem to make the biggest difference in maintaining glitch-free audio output. When running within the User Interface thread (the default), it's competing with other tasks also running in the UI thread (VI Server, the "root loop") plus actual UI events (window drawing, user inputs, etc) which are all potential sources of glitch causing jitter.

 

Other things to help reduce glitches include disabling debugging in VIs, and ensuring no calls to VI Server occur within non-UI execution thread VIs.

 

As an example of all of the above, I recently wrote an open source DJing application in LabVIEW which achieves glitch-free, low-latency, continuous audio output using LabVIEW's sound API or the WaveIO API. Here's a short example video of it in action, showing simultaneous playback, file loading, and interactive audio processing, while maintaining glitch-free output.

Some questions and things to try:

  • Is ASIO output a requirement, or can the application handle slightly higher audio latency?
  • Are you using ASIO4ALL as the driver, or a soundcard with a dedicated ASIO driver? ASIO4ALL is generally good, but can have problems.
  • Consider moving the WaveIO code and waveform generation into a separate subVI and set it to a different execution system + thread priority
  • Extending the previous point, one subVI dedicated to audio production and manipulation (generating the audio data), and a second subVI dedicated to audio output. These would both run at different priorities and execution systems to each other and the main VI.
  • Is the DVR being accessed elsewhere while this code is running (potentially causing it to block)?
  • IPEs do have some overhead, so unless they're absolutely necessary I'd probably remove them. The LabVIEW compiler is pretty good at avoiding memory copies.
  • Does a simplified example work without glitches?
  • I couldn't see it in the code, but what buffer settings are used when initializing WaveIO? I've used 3 buffers, 1024 samples/buffer, and Samples as the unit successfully.

Re: Problem With Invoke Node in Excel_Save_Workbook.vi, LV2018(32)

$
0
0

Sorry, you've (probably) gotten bad advice.  The problem is that Microsoft made a change in some of its functions and forgot to tell NI.  You are correct about the source of the problem, but you do not want to replace NI's code.  You want to start with a good installation (that doesn't work because Excel_Save_Workbook is "broken").  Here's how to fix it:

 

Open it up and expand the Case Statement so that you can see the Invoke Node.  It is probably broken, and doesn't look like the one in the picture, below (it is missing the last entry).  I think you can right-click the Invoke node and ask it to "repair" itself, which should (a) change it to look like the one shown here, and (b) make the Broken Arrow go away.  That will fix it (until you reinstall LabVIEW, but you'll just do the fix again).

Excel Save Workbook.pngFixed Excel_Save_Workbook

Bob Schor

Re: Constructor Node Error creating instance of RootCommands code 1172

$
0
0

Dear Kyle97330,

 

thank you for your reply.  

I have encountered the same problem as he mentioned “

Error Code 1172

Constructor Node Error creating instance of RootCommands in assembly Aerotech.Ensemble.LabVIEW.Commands.RootCommands, Aerotech.Ensemble.LabVIEW, Version=4.8.1.3, Culture=neutral, PublicKeyToken=478e72719c32735e, (System.NullReferenceException: Object reference not set to an instance of an object.) <append><b>System.NullReferenceException</b> in...... “

This error apears for almost each VI that I try to run in LabView 2012.

The program was creted to run in LabView 8.6

 

Re: Network-Published Source Item List

$
0
0

Is the cRIO target itself deployed and connected to the actual target?

 

Can you see the cRIO in NI MAX?

Re: Simulate Signal Express VI over generation problem

$
0
0

No, you did an excellent point out! 
That I need to use the for loop (controllable iteration) with waveform generator VI, which allows deeper modification. Especially, the sample rate is actually a VI input gate, therefore I can directly intervene to change the iteration time and value (step) different between two consecutive generation points. 

In the case of high thermal inertia (like a thermal bath), I can just make the iteration time extra slow (a couple of minutes perhaps). Otherwise, if it's too fast then the lag behind the desired temperature will occur.

Re: Constructor Node Error creating instance of RootCommands code 1172

$
0
0

Please,find attached one of the VI.

 

Thank you for your help.

Re: Constructor Node Error creating instance of RootCommands code 1172

$
0
0

Please,find attached one of the VI.

 

Thank you for your help.

Re: Constructor Node Error creating instance of RootCommands code 1172

$
0
0

"System.NullReferenceException" means that there's a .NET reference that wasn't created properly.  I don't have the code for the instrument driver you're using but my best guess is that it needs to get a reference from "somewhere" but that "somewhere" is either code you're not running or code with an error in it so it passed out the default (null) reference value.  So whereever the "Controller in" wire comes from, track that down.

 

It could be something like there's an "initialize" VI that needs to be run before you can run any other VI in the library.  Basically, you need to find the origin of the wire that goes into the node that gives you the problem, and trace it back until you find where it originates, and make sure it originates from either a constructor node, a static property node, or a static invoke node.


Re: LabVIEW 2018 64-bit with Microsoft SQL Server Manager

$
0
0

You only need a connection string to connect to MSSQL using the SQLOLEDB driver. 

A shortcut for getting a connection string is as follows:

  1. Create a text file on your desktop and rename it with a .UDL extension. 
  2. Double click the file to open Data Link Properties window.
  3. Configure the connection using OLEDB for SQL Server.
  4. After successful connection, save the settings and open the .UDL file with a text editor (Notepad, UltraEdit, etc).
  5. Connection string is stored in this file
  6. Now in LabVIEW, use this connection string on the DB Tools Open Connection VI.  Wire a string constant into the "connection information" terminal.

Re: Constructor Node Error creating instance of RootCommands code 1172

$
0
0

You are right! I have tried to run every VI in order to get the reference but I can't find it.

 

I also received the PropertyNode error when I run the VIs attached.

 

Thank you.

Re: Not connecting to some shared variables

$
0
0

So I did some tests with the timeouts. Removing timeouts completely (i.e. wiring -1) results in the VI running forever, and never progressing past the Open and Verify Connection. Putting short timeouts (less than 45 ms) results in none of the SVs being connected to. Anything over 45 ms gives the same results -- successfully connects to some SV, but not to others from the same library.

Re: write to measurement file change headers names

$
0
0

Hi RTSLVU,

 

Could I trouble you for some dumbing-down of your excellent File I/O explanation for my benefit?

 

The code snippet I wrote in WTMFile.png works well to acquire and save the required data.

 

Great, except, I still do not understand how to change the column headers from Untitled, Untitled 1, etc., to a meaningful names i.e. PSU Monitor, Temp Monitor.

 

I really like the first-principles way you suggest of ditching the Express VI and using low-level File I/O commands, however, I got stuck on Step 3.

 

So, might you be inclined to describe how to write headers through the Express VI or elaborate a bit more on your method?

 

I've hit a wall using the Write To Measurement File Express VI, with respect to how segment headers are handled, as most of the web "advice" just regurgitates the  NI help file information and I haven't been able to integrate the Forum solutions on this subject.

 

Thanks for any time you might have to help.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Re: LabVIEW 2018 64-bit with Microsoft SQL Server Manager

$
0
0

My method is what is shown in the PDF.  Apologies for the duplicate information.  One of these days, I'll stop making a fool of myself and start by fully reading the posts. 

 

The problem most likely lies in the decision to use LabVIEW 64bit.  I don't know anything about your application but my assumption is that 64bit LabVIEW is overkill and causes various other problems, like the ones you are experiencing now.  Any driver that you use will need to be 64bit.  If your customer insists on using ODBC, try to use the ODBC application in c:\windows\syswow64\odbcad32.exe.  I think this is the 64bit version of ODBC and may be required to work with 64bit applications.  If your driver is not available in this version of ODBC (but is available in the ODBC app in the Start menu), it's because you only have the 32bit version of the driver installed. 

Re: write to measurement file change headers names

$
0
0

Well as I said lose the Express VI, although I am pretty sure you can set the headers in the Express VI. But I don't know how to do that as I have been using LabVIEW before the inception of Express VI's and never found the need for them. Frankly to me Express VI's are not intended for "production" use they are only there for those 2 hour LabVIEW sales pitches seminars to show managers how fast you can just throw something together in LabVIEW.

 

This is what your program should be doing

 

  1. Open a file
  2. Write header strings to file
  3. Enter acquisition loop
  4. Take measurements
  5. Write one line of measurements to file
  6. IF NOT "done" GOTO 4
  7. Exit of acquisition loop
  8. Close file
  9. End  

Color tracking positions x, y into indicators.

$
0
0

Hello. I am working on color tracking programe but I have problems with indicating positions. My goal is to add 4 LED indicators (names: top left, top right, bottom left bottom right), divide image and depending on object positions it will light corresponding LED indicator. At the moment I can aquire x,y position of tracking object but cant move further. It might be better solution, this one was just for example.


VI runs OK from project but freezes when loaded separately

$
0
0

I have a main VI that was working properly for a while. Suddenly, the VI would freeze when loaded and I can't access the menu bar or hit the run/abort icons or use hotkeys to run or display the block diagram. The mouse cursor would also look stuck at a certain shape, like the click finger or resize arrows depending on it's state prior to launching the VI. I can't exist the VI except through ctrl+alt+delete. Oddly enough, I can start and run other VIs/projects while this problematic VI is in the "frozen state". In my attempt to solve the problem, I modified the name of one of its subVIs from windows explorer. As a result, when the problematic VI is started (double clicking the VI in windows explorer) Labview will display a window browser and ask for the directory of the modified subVI. I supply the directory, the problematic VI finishes loading and is NOT in a frozen state, I can run, modify, save, and use normally! The problem shows up again when I exit and load the VI.

 

In another attempt, I got myself a little organized and grouped all subVI and this main VI in a project. The problematic main VI runs okay from the project explorer but goes into the "frozen state" when ran separately. 

 

Prior to the frozen state problem, I was modifying the allow debugging, execution priority, and the reentrancy settings of the subVIs. I believe I now changed all of these back to where they were before the frozen state problem. Didn't help! Also prior to the problem I had a problem with one of the subVIs that was using too much memory where it would fail to compile, I solved this problem and this subVI is compiling properly. I also deleted the part of the main VI that calls this memory extensive subVI and still no luck. Also, prior to the problem, I configured some loop parallelism on some of the loops in the main VI and subVIs. In attempting to solve the frozen state problem, I disabled loop parallelism from all loops and still no luck. 

 

I am using Labview 2013 32-bit on a 64-bit machine. The problem happened on 2 different laptops. It also shows in safe mode!!

 

Please, help! 

Thanks

Re: How to get the continuous values range from a 2D array?

$
0
0

So it seem you want to isolate ranges where the value decrements by one. Here's a very quick draft to get you started.

(For large inputs, I would only keep the max and min in the shift register, so modify if this is needed)

 

 

GetRanges.png

Is NI PXIe-4081 supported under LabVIEW 2013 DS2

$
0
0

I need to use a new PXIe DMM and the previous developer chose the PXIe-4081

The challenge is that I cannot change the underlying application and it uses the NI Developer Suite 2013 APIs.  The 2013 DMM Drivers are NI-DMM v3.1 and NI-DAQmx 9.7.5; so, that is what I have installed.  I have found in the past that I can safely update drivers as long as they are compatible with LabView 2013 (since it uses the same APIs.

 

When I run NI MAX it flags that there is no Windows driver associated with it; so, something seems wrong.

 

Is NI-DMM v3.1 compatible with the PXIe-4081? 
Where do I find the required driver version number and what version of LabView the driver will work with?

QMG 700 Inficon help needed

$
0
0

Hi Everyone, I am using QMG 700 inficon for analysis. But an issue appears when i try to do Faraday and analog scan for 512amu, it only gives such result can anyone help in this regards. I know its not a right forum to ask but its urgent.

 

Please find the attachment.

 

 

help on obtaining pressure map

$
0
0

I'm trying to obtain pressure map of the pressure field generated from ultrasound transducer. I need to record the data with automated motion for the 50x50 pixel field. Since I am a beginner, I have no idea on what drivers do I need for automated data acquisition. Any help from experts?

Here is my setup:

-Ultrasound transducer

-Needle Hydrophone+DC coupler (Precision Acoustics)

-3-Axis stepcraft 420 ck

-LabView Software

Viewing all 204132 articles
Browse latest View live


Latest Images

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