Quantcast
Channel: LabVIEW topics
Viewing all 67019 articles
Browse latest View live

Moving mouse speed up DAQmx

$
0
0

Hello there, 

I'm doing some properties testing with a very large project and found that collecting data at 1500 Hz by reading 30 data is fine, reading less than 30 data per read creat buffer buildup. However, I also found, by pure hazard, that moving my cursor increased the speed of my VI to the point where the buffer bugo back to zero. It is speeding read/iteration speed. Any idea of what could create that behavior? I would voluntarily share my project, but it includes more than 100 sub VI/Ctrl after 10 years of work on it. 

 

Thanks!


Map of a Map

Crash when replacing a TabControl with "Replace No Attributes" method

$
0
0

Hi,

 

In the same vein as my previous topic: https://forums.ni.com/t5/LabVIEW/Crash-when-undoing-a-TabControl-replace/m-p/4426977

 

This time, just replacing a TabControl using GObject method "Replace No Attributes" is enough to crash LabVIEW.

I have tested by providing both inputs (either "Style" or "Path"), with LV2020 SP1 (32bit), LV2021 SP1 (32bit) and LV2023 Q3 (64bit).

 

LabVIEW message:

raphschru_1-1741484154082.png

 

Crash report:

e:\builds\penguin\labview\branches\2020\dev\source\panel\datamgr.cpp(1487) : DAbort 0xAC04EE80: replace should have set typeChanged? 

 

Here is the (very) minimal script to reproduce the crash:

raphschru_0-1741482568696.png

I am currently coding a scripting tool that helps customizing GUIs by replacing existing controls by new ones, and a bug like this is potentially a showstopper for TabControls.

This is surprising because it works like a charm for clusters, which are much more complex data structures to replace, especially when initial and final data types don't match.

 

The only other way I can think of is way more complicated:

1. Create (from path) a new TabControl on the target VI;

2. Position it where there is the current TabControl (control on the FP and terminal on the BD);

3. Disconnect the current and reconnect the new terminal on the BD and potentially the connector pane;

4. Get a list of all static links to the current TabControl (references, property nodes, invoke nodes, locals, event structure cases), disconnect those links and reconnect them to the new TabControl.

5. Get a list of all contained controls and decorations by page and move them to the new TabControl;

6. Finally remove the old TabControl...

 

A huge amount of work compared to just calling a single method...

 

Regards,

Raphaël.

Licensing issue with LABVIEW software

$
0
0

hi, every one, we have 60 pcs, we would like to buy 30 licenses of lab view software and install on all 60 pcs, but will user only 30 pcs simultaneously, and 30 will be on standby, 

 

it is possible? 

 

please suggest. 

problem with dll

$
0
0

i have made a dll from c code, i have all the relevant files but when i make vi's using import function of shared library, it is returning me with error, i m attaching the screenshots, can anyone help me get out of this problem, it will be really kind of you.

Getting Started with Modbus over RS485 (LabView)

$
0
0

Hello NI Community,

I was thinking about implementing Modbus on LabVIEW. I need your suggestions to start with.

 

I'm also hoping that if someone has already done it. What approach they adopted? (Can share block diagram or VI)




Help with LabVIEW VI: Plotting a Circle Using State Machine Design Pattern

$
0
0

Hey everyone,

I'm working on a LabVIEW project and need some help understanding how to implement it properly using a state machine design pattern.

📌 Task Description:

I need to design and implement a simple VI that:

  • Prompts the user for:

    • Name

    • Radius

  • Then plots a circle with the given radius on an XY Graph.

  • The VI should have:

    • A Start button to begin the sequence

    • A Stop button to exit

💡 Functional Requirements:

  • The VI should idle initially, waiting for either Start or Stop.

  • Once Start is clicked:

    • Prompt for Name and Radius.

    • Plot the circle using the radius on XY Graph.

  • Use a state machine design pattern to structure the VI.

Has anyone done something similar? Any tips, example VIs, or suggestions on how to structure the states would be super helpful!

Thanks in advance! 😊

Memory Leak suspected in TCP/MQTT (re-)connection

$
0
0

Hi LabVIEW community,

Issue: I am having a memory "leak" in my application which I have high conviction is in my MQTT connection. Running my application over the weekend adds up to a memory consumption around 4 - 8 GB. Leaving it running longer I have reached 14 GB it just keeps going.


Application: the application reads measurement data from test-rigs and streams it to an MQTT broker. Reading test-rig time-series is done over TCP or API and stored in a waveform. This waveform is not extending, only the last value for all channels. The streaming to the (Solace) broker happens over secured TCP connection via MQTT application.


General details:
Running on Windows 10. Currently using LV24/Q3 64-bit but the issue was already there in LV22/Qx 32-bit so don't think this is related.
Additional libraries are the JKI State Machine, that takes care of all user interaction and the MQTT library from 'LabVIEW Open Source Project'  library to stream the test-rig data to the broker.

What did I try?
I have tried a ton of things to locate the memory consumption. Eventually disassembled my code into sub segments and ran them all overnight to see which part was responsible.
--> Result: memory consumption is increased by my streaming.vi subVI which only (re-) connects and sends the data to the broker.
To further allocate where in the streaming the issue is I changed from streaming over TCP-SSL to Solace broker over MQTT to streaming over TCP to a Mosquitto broker.
--> Result: running over the weekend memory consumption was still the same as at startup, 350 MB (instead of 4 - 8 GB).


The TCP-SSL MQTT connection to Solace (that has a leak) keeps disconnecting the client about 20% of the iterations. Though the regular TCP to Mosquitto connection remains stable and keeps the client connected.
Attachments: I created 2 snippets of the differences that have and didn't have the memory leak while keeping all of the other code identical.These snippets are in an over coupling case selector which only executes this connection case when no client is connected. I researched general TCP & MQTT connections but couldn’t quite figure what is wrong in my configuration.

  1. Why does it disconnect in the first place, am I missing something in my secured TCP/MQTT connection to Solace (left) that causes it to disconnect the client?
  2. Memory issue could be related to the re-connecting together with the way its setup. Am I doing something wrong in reconnecting the client while MQTT is still connected that causes memory consumption to increase when it re-connects?

So I think there is an issue in the way I implemented the TCP & MQTT connection for both cases but it only shows up in the TCP-SSL Solace connection due to the client constantly disconnecting. It might be that multiple 'ghost' connections are open but this is strange since connection to is only setup if no client is connected.

 

Sorry if I am missing any crucial details but would someone with more knowledge about MQTT and TCP-SSL be able to help me out here?
I know snippets are not ideal but I guess sufficient

Thanks in advance!
Grtz, CarcS


ZICK ZACK problem

$
0
0

HI Everybody,

 

I am working on a project that involves two motors:

 

One motor moves along the X-axis.

The other motor moves along the Y-axis.

The intended movement pattern is as follows:

 

The X-axis motor moves from a starting point to an endpoint in steps at specific intervals.

Once it reaches the endpoint, it returns to the starting position with same intervals.

Then, the Y-axis motor moves one step forward.

The X-axis movement repeats after each Y-axis step.

Issue:

Instead of following the expected sequence, my system is executing the movement incorrectly:

 

The X-axis motor moves from the start to the endpoint in interval.

The Y-axis motor moves forward.

then X-axis move back with interval

Thanks

 

Unbenannt.PNG

Installer

$
0
0

I'm trying to install an Excel template into my project. This works fine when the project is running on my computer but when I build a Installer to install the program into another machine, the "path" is never the same as the path that is on my computer. How can I create a generic path that any computer can recognize

FPGA custom trigger for PCIe 5763

$
0
0

I want to be able to acquire a set amount of samples every time I receive a trigger. I want this implemented on the FPGA level since this would be the fast process time for that trigger. I am open to any suggestions.

 

Hardware: FlexRIO PCIe 5763

Application Directory in RTEXE

$
0
0

My RTEXE builds are having Application Directory return a path WITHIN the rtexe instead of the folder containing the rtexe (presumably it's not recognizing being built into an app and is instead returning the folder containing the top-level VI?)

 

Has anyone else seen this? Is this somehow expected behavior?

Labview String and Array help

$
0
0

Hi,

 

I'm currently running into an issue of converting some Numeric and String data into an array then exporting it to a .csv. The issue arises when I take my data (29.0;1.1;30;STRINGNAME) and it through the [Spreadsheet String to Array.vi]. It will put it into 4 columns, 29.0   1.1   30   0, with the STRINGNAME being converted to a 0. I need the first 3 to be numerical and the last one being a String. Part of the reason I'm doing this is because it needs to be a 2D array going into a [Write Delimited Spreadsheet.vi]. 

 

For more specifics if needed, I'm using a case block with several different enumerated states, which is the "string" value i've converted from enum. This state needs to be logged next to the data pulled from a Keysight Electronic Load, which is giving out the Voltage/Current/Power from the Read Visa. The data is being build into a .csv file which essentially needs the keysight values logged next to which state it was in. I have a few blocks that basically dump data every so many samples, so I need to keep track of which line of the array it is at. The [Search and Replace String.vi] is used to get rid of the Line Feed Constant the Keysight puts in line with the data it sends. This is where I'm looking to take this string of data (in the format of [volt;curr;pow;STRING]) to put into a csv file. 

 

Any help or thoughts would be appreciated. Still newer to Labview and I'm sure I'm probably overlooking a simple block that does this, and I'm just not recognizing it. 

 

AliasLP_0-1741642790736.png

 

9375 RSI shared variable array data order

$
0
0

I'm using a 9375 (16 DI, 16 DO). I plop the RSI module refnum on the block diagram, wire it into a Scanned Variable Read VI, give it a Boolean Array data type and voila, I'm reading all 32 bits (the outputs are in read mode). This seems like a great idea eliminating serpentine error wire mess if you're just reading all the shared variables.

 

However, instead of a logical data order they are scrambled. DO2 shows up at bit 4 of the array, D01 bit 8 and D03 bit 11. I could go through all thirty two bits, but I was wondering if there is a logical sorting to these values or will they change over time and/or software changes?

my tanks keeps fluctuating even when there is no input it starts to fill

$
0
0

I am taking all the data from modbus tcp /ip , and from that the tanks are getting filled 

Ignore all the names of the tank because i  am editing someone else code so 

Please help i don't really know why it is getting filled even when there is no input even when the scale is constant 

I am getting data from icp con et 7017 -10  that is the hardware i am using from that i am getting the input i am sending it through Lan , so that my tanks gets filled 


Application crashes on launch after switching to Labview 2025 Q1

$
0
0

Hello, I would like to switch to Labview 2025 from Labview 2024 Q3. My application works fine in debug mode, can be builded, however when I lauch .exe, it crashes. NI Error Reporter shows me this window. 

soundslikesound_0-1741680100431.png

When I open .dmp file in Visual Studio and run Diagnostic Analysis I get these infomation. 

soundslikesound_1-1741680244725.png
soundslikesound_2-1741680258012.png

 

Application worked perfectly in Labview 2024 Q3, this behaviour never occured. I am using 32-bit Labview. Google did not help. I tried to reinstall Labview 2025. Did not help. Then I uninstalled all NI software and installed just Labview 2025, unfortunately it also did not help. Can you help? 

Is there a way to change a tab control from a system style to another style without lasing all the controls and connections?

$
0
0

I have a system-style tab control with a lot of pages and controls. My client now probably wants a dark mode where the tab colour can be changed to dark grey, but I can't do that with a system tab.

If I replace it with any other style of tab, it loses all the controls and indicators.

 

The tab control is typedefed, but replacing the tab type in the typedef doesn't help either.

 

The only way I can think of doing this is to drag all the controls out of every page into blank areas of the front panel, replacing the tab control, and then dragging all the controls and indicators back. That's a really big task.

 

Is there a better way to do this?

 

(LabVIEW 2022)

 

 

Convert graph xy-axis while measuring

$
0
0

dlehdgh20_0-1741686246101.png

dlehdgh20_1-1741686254901.png

In the above graph, the y-axis is calculated by the formula (1stsignal−4thsignal)/(3rdsignal−4thsignal)(1^{st} signal - 4^{th} signal) / (3^{rd} signal - 4^{th} signal), and the x-axis is determined by calculating the energy per pulse as the average output divided by the repetition rate. Then, using the formula F=E/(π×beam divergence2)F = E / (\pi \times \text{beam divergence}^2), the fluence is calculated. However, when measurements are taken through LabVIEW, we obtain a graph like the one above. Is it possible to convert this to the graph below in real-time

 

Problème d'échantillonnage de plusieurs voies

$
0
0

Bonjour,

 

J'ai un problème avec mon code Labview.

Je n'arrive pas a avoir le nombre de valeurs souhaité dans mon tableau. Je demande 20 valeurs mon tableau n'en donne que 2.

Je souhaite obtenir dans 2 tableau différents 20 valeurs de 2 voies différentes.

 

AIDEZ MOI

New to labview need for internship

$
0
0

I recently received an internship offer for a test engineer position over the summer. I’m curious to know some effective ways to learn LabVIEW. Could you please share some helpful tips and any general advice you’ve gained from using this software?

Viewing all 67019 articles
Browse latest View live