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

Closing MatLab Issue

$
0
0

Hello, I am running into an issue where the runtime of each loop iteration increases when only opening and reading .mat files using the "MATLAB" data plugin. Attached is a VI replicating what we are seeing in a much larger analysis VI. It continuously opens the same .mat file and calculates the runtime. Opening task manager shows the memory slowly increase while the VI runs. As default, the VI's graph shows the results I got after stopping the while loop after 2002 iterations.

 

I have read that not closing the Read Data Storage can lead to memory leaks, which I have tried separating the Read and Close Data Storage parts with a Flat and Stacked Sequence Structure, but I keep getting the same error message (Error -2553). I don't understand why the error occurs since it is my understanding that these structures should execute the Close after Reading. Error also happens in the final iteration of a For and While Loop when the Close is outside the loop. Attached is a VI with these cases that I have tried.

 

I also attach a single .mat file to use to test.

 

Any help on this issue would be appreciated.


Re: Reading VEE data files into LabVIEW

$
0
0

The VEE schema looks kind of like the labview flatten to XML schema. Enough so that you could probably parse the VEE schema to labview XML schema then use the unflatten from XML to import the converted VEE schema into labview. Might be more work than it is worth if the data field is the only thing that changes. Check out the labivew XML schema: 

Screenshot 2024-10-08 at 9.23.08 PM.png

snip.png

Re: My Scaling VI running slow

$
0
0

@GOB34 wrote:

Would you recommend changing the method of indicators?


I have no idea what you mean by that cryptic sentence.

Re: My Scaling VI running slow

$
0
0

Fair, sorry about the short wording.

 

I was responding to your question in Message 16 of 31 in this thread,

 

"I was not asking about timing, just about these indicators."

Re: My Scaling VI running slow

$
0
0

Yes, I got that, but I still have no idea what "changing the method of indicators" means? Makes no sense!

Re: My Scaling VI running slow

$
0
0

It seemed that you were recommending a different approach to showing these data being that they are waveforms but I am only indicating values.

Re: My Scaling VI running slow

$
0
0

All your data ever display are a single scalar value (or maybe a chart?). If you would scale on these few scalar values would be significantly more efficient that processing all these waveforms, then throwing out all results except one for each waveform.

Re: My Scaling VI running slow

$
0
0

Thanks for the clarification, I hear you.

 

I do use all of the waveform info in other parts of my project, so that info is not "thrown out".

 

I see what you mean, though, on doing the scaling on only the scalar data.

 

I have implemented the approach of doing the scaling on the incoming data as described above and it is working very well. I do record the scaling factors for each channel in the TDMS file so those scaled data can always be reverted to raw voltages if needed.

 

I appreciate your support and advice.


Windows 11 API call to prevent Windows Update during critical test

$
0
0

Hi fellow wirers - On my company's manufacturing floor, we run a 20-hour critical test overnight controlled by a Labview program. The controlling computer is Windows 11. Occasionally Windows does an update automatically and reboots the computer, interrupting the test. With Windows 10 and earlier, I was able to configure Windows Update to only perform an update when manually directed, but I can't configure that in Windows 11. Do you know, is there any Windows API call or other call that I can execute within my Labview program for me to programmatically pause Windows updating until the test is complete?

Thanks very much,

Joe Czapski

Wilmington, Mass.

 

Re: Windows 11 API call to prevent Windows Update during critical test

$
0
0

The Windows Update policies can be set by using Group Policies. This has not changed between 10 and 11. However, it depends on your edition of Windows (Home, Pro, Enterprise, ...) if these policies are available. I also found that the specific combination of settings that need to be set and services that need to be disabled to produce an update-proof system may change suddenly and unexpectedly between updates.

 

The general rule is that the Home and Pro editions are designed to be consumer products. If you have enterprise grade tasks and requirements, the Enterprise edition is probably required to solve them.

 

Also, it your uptime requirements cross a certain threshold, you might want to consider moving to a dedicated high-reliability system.

Error -200019, ADC conversion

$
0
0

I have a project were I'm reading multiple AI Channels from sensors of the engine test  bench, I've set up DAQmx Timing and connected it to my encoder pulse which has a pulse every 0.1 degrees. When I run the engine at speeds <1500rpm the program runs fine but when i increase it to >2300rpm i receive this error. I have attached my VI to the query. I am using a NI USB 6351.

Re: Windows 11 API call to prevent Windows Update during critical test

$
0
0

My answer to this is quite simple. No internet access means no updates.

 

There's no good reason a computer running a test needs internet access. Especially a computer that is part of production test.

 

Run calculations on cRIO

$
0
0

I hope this both isn't a dumb question, and that I can adequately explain my issue.

 

I'm a part of a company that has existing software designed and built for a specific purpose (collecting data of a piece of equipment, and opening/closing valves using solenoids controlling air actuated valves).

 

It was designed so that, when connection between the computer controlling the equipment fails, it safe's the equipment by opening certain valves and sets heaters to cool the equipment. This is done as a part of an engineering control for an industrial setting. On testing, it was found that the software functions mostly correct, it doesn't do everything that the technicians want it to do but that is easy enough to fix.

 

My problem lies in that connectivity issue. When you pull the cat5 cable from the cRIO, it loses connection to the computer, and on the computer side, it opens the safety valves and does all the appropriate actions. But, since it doesn't have connection, the cRIO does none of these things, and it proceeds as if nothing happened. When it is plugged back in, it takes a few seconds, but it eventually catches up and does the appropriate actions.

 

I was trying to figure a way to set up a series of calculations that the cRIO can do on it's own, and when it reaches a certain point it does the things I want it to do. For example: Set a variable to 30. Have the cRIO tick it down by 1 every second. When the computer is connected, it continuously sets the variable to 30. If it loses connection, the variable doesn't get reset, ticks down to 0, and enacts the actions we want it to do in the case of a loss of connection.

 

Is this possible? I've only really dissected the existing software, and I haven't really dealt with running anything on the cRIO's.

 

For reference, we have both 9012 and 9056 cRIO's in use across our equipment.

Re: To more specific class works on IDE but not on EXE, on target machine

$
0
0

Hi Jay,

thanks for Your feedback, but the point is that ini file is correctly read, not all of the data are correctly displayed as this refnum is not handled properly by the exe, while in the development evironment everything works well.

I previously indexed directly the array of refnums, with a lastvalue + conditional behavior to have the needed refnum referring to the controls where I need to show the data.

With the problems I found, I changed the parsing VI as I read that this approach can give problems.

I get refnum without errors out of the parser, but when i fetch it to a "To a more specific class" VI, than rises the 1057 error.

On development environment I see that the ControlRef is referring to the correct control, so I do not unerstand why I get the error.

Silvio 

Re: To more specific class works on IDE but not on EXE, on target machine

$
0
0

@SPRD wrote:

Hi Jay,

thanks for Your feedback, but the point is that ini file is correctly read, not all of the data are correctly displayed as this refnum is not handled properly by the exe, while in the development evironment everything works well.


Silvio, can you please "strip down" your project just up to few "minimal" SubVIs with few controls, where this problem is reproducible and share project here as source code as attachment?


Re: Windows 11 API call to prevent Windows Update during critical test

Re: To more specific class works on IDE but not on EXE, on target machine

$
0
0

@SPRD wrote:

Hi Jay,

thanks for Your feedback, but the point is that ini file is correctly read, not all of the data are correctly displayed as this refnum is not handled properly by the exe, while in the development evironment everything works well.

I previously indexed directly the array of refnums, with a lastvalue + conditional behavior to have the needed refnum referring to the controls where I need to show the data.

With the problems I found, I changed the parsing VI as I read that this approach can give problems.

I get refnum without errors out of the parser, but when i fetch it to a "To a more specific class" VI, than rises the 1057 error.

On development environment I see that the ControlRef is referring to the correct control, so I do not unerstand why I get the error.

Silvio 


Yes, you are getting the 1057 error because;

  • the string array is empty 
  • Therefore the for loop iterates 0 times
  • Therefore the error out of the loop is default value because you didn't put the Error wire on a SR.
  • AND The default I32 will be 0
  • THEREFORE the index of refnum returns a refnum to a listbox control 
  • Therefore you get the error 1057 because a listbox cannot be cast to a ring

Do what I said before.

 

Then we can try to figure out why the string array is empty (probably a rel path changes in the exe causing an error 7 that you lose in the following 0 iteration For Loop! BECAUSE you didn't put the Error wire on a SR)

 

You really want to return "Not a Refnum" if the string array is empty or the control Label is not found!!! As it is you will return refnum index 0 in either of those cases!  And that refnum is to a listbox control type! Hence, error 1057 from the "To More Specific [Ring]"

 

Note: do not simply replace your loop with the search array primitive!  A NULL string matches everything and you'll just exchange bugs.

 

Lastly,  thanks are kudos.   Just click the yellow star  

"Thanks but," generally means that we failed to communicate.   So let me be clear... Your Get Refnum from Name.vi is f'd^! Fix it!

Re: Darren's Occasional Nugget 06/12/2023

$
0
0

I've got a medium/semi large sized application (~5000 vis) where the build time jumped from 20-30 minutes to close to 1.5 hours, but this happened after several weeks of development without a new build, so I don't have a good idea exactly when this change occurred. I'm fairly certain my application doesn't have any major circular dependencies (although it is actor framework based and the actor framework and AF debug are circularly dependent on each other so there is at least one). Does anyone know any easy ways to track down potential other causes? When I enable the build log, I see some VIs/classes have very long save times, is this an indication that these are areas that might be causing the issue, or is that not a reliable metric?

 

Similarly, I'm wondering if anyone has seen build time improvements from putting some of their smaller libraries or things like widely used typedefs into PPLs? As I mentioned this is an AF project, with a fairly large framework that much of my application specific code depends on, so moving the whole thing to PPLs would be a major undertaking - is there a worthwhile benefit to using a few PPLs? Or even just building the actor framework into a PPL?

 

Example build log

SourceItem[386]
sourcePath:removed
destPath:removed
saveLevel:0x0
saveTime:10027

Labview FPGA Compilation error for NI-5753 with FPGA target PXIe-7962R

$
0
0

Hi. I'm getting an error when trying to compile the NI 5753 (AC) - Getting Started example for an FPGA target PXIe-7962R.

I also have a NI 5753 (AC) with a FPGA target PXIe-7976R in the same chassis and for this target the compilation works correctly and everything works just fine, so I guess everything is ok with my Labview version and license. Also, I can compile other example projects for the FPGA target PXIe-7962R which are not related with using the adapter module NI 5753.

Is there anything I can do to be able to compile and use the NI 5753 with my PXIe-7962R?

The error obtained is bellow:

An internal software error has occurred. Please contact National Instruments technical support at ni.com/support with the following information:

Error 7 occurred at niFpgaTopLevelGenCallTargetSpecificVI.vi<-niFpgaHandleConstraintsAndMiscFPGAFiles.vi<-niLvFpgaTopModGen.vi<-niLvFpgaTopModGen.vi.ProxyCaller

Possible reason(s):

LabVIEW: (Hex 0x7) File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.
=========================
Nonexistent GPIB interface.

Attempting to copy a file "C:\Program Files\NI\LVAddons\flexrioii\1\Targets\NI\FPGA\RIO\79XXR\Common\FpgaFiles\DramASx50t\dram32IntfA.ngc" that doesn't exist. in C:\Program Files (x86)\National Instruments\LabVIEW 2024\resource\RVI\StockIO\private\topModGen\niLvFpgaTopModGen.vi

Re: Windows 11 API call to prevent Windows Update during critical test

$
0
0

@RTSLVU wrote:

My answer to this is quite simple. No internet access means no updates.

 

There's no good reason a computer running a test needs internet access. Especially a computer that is part of production test.

 


Tests really need to be treated like Experiments.  You MUST MAINTAIN INTEGRITY of the test system.   That means.  NO OS UPDATES without a written and approved "Deviation. "  just require that your IT department provides the Deviation and Justification documentation.   They will be happy to disable any forced updates or reboots.

Viewing all 203016 articles
Browse latest View live


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