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

Microseconds While Loop (Arduino and Labview)

$
0
0

Hello,

Currently I am controlling my Arduino code via NI Visa from Labview.

The issue is that the Labview will work randomly. I think this problem  might be that the delaymicroseconds in Arduino with the milliseconds in Labview. I read some other articles in the community regarding connecting my DAQ. I have the NI USB 6218 which has Timing resolution 50 ns.

My question is what should I read with the DAQ, when I dont need it for any measurements for this VI. Any suggestions?

Regards,
Alexis



change Additional Installers path in application builder

$
0
0

For legacy reasons all our software has to be installed in the main root drive under a new folder. It is easy to set this folder for the build executable but not for the NI Additional Installers (i.e. NI LabVIEW Runtime Engine).

Is there a way to configure the default path for those extra installers from the Application Builder itself or from any LabVIEW configuration ?

[Modbus TCP/IP] server stops responding after some time

$
0
0

Hello everyone,

 

We have a district heat substation (https://www.enerpipe.de/de/produkte/13627/uebergabestationen) from which we are trying to read some sensor values using Modbus. The Modbus communication module is from Schneid (https://schneid.at/product/schneid-cm08-tcp-steckkartenmodul/). Configuration on both sides is correct, so I think I don't have to change anything there.

 

The main problem that I am facing is LabVIEW stops reading the data after some time (I am not sure why but this seems to happen close to an hour after starting the VI). After that, it just starts writing 0 to the text file. We want to run the vi for ~7 hours (to simulate summer/winter day) and it is important to log all the values for this duration.

 

And this error is sometimes random. Like it stops reading after a few minutes but when I ping the IP the device responds. I tried to poll the values using QModMaster and I can read the registers in this way.

girish_jadhav_0-1598884912852.png

girish_jadhav_1-1598885148687.png

 

This is making harder for me to debug the error. I have tried increasing the timeout value, disabling the firewall, and reinitializing the Modbus Master when there is an error but have been unsuccessful in solving this. 

 

Some of the errors I got when running this VI:

 

Error 63 :

Create connection in TCP Master.lvclass:Initialize Master.vi->Modbus Master.lvclass:Initialize.vi->API Main.lvlib:Create TCP Master.vi->1. read_multiple_registers.vi

 

Error 56:

IP Data Unit.lvclass:Read ADU Packet.vi:5030001<APPEND>

<b>full call chain:</b>

     IP Data Unit.lvclass:Read ADU Packet.vi:5030001

     Modbus Master.lvclass:Read Holding Registers.vi:2420001

  1. read_multiple_registers.vi

Related post I made a few days ago: Post 

 

 

 

 

Best Practices for Custom Error Codes in All Projects

$
0
0

Hey all,

 

So I have a bunch of libraries that get packaged and put into the palettes using VIPM. They are used everywhere in a bunch of my projects, and I'm now starting to run into the problem of generic LabVIEW error codes meaning multiple possible things.

 

To be more specific, error code -2147467259 can come from either VIs within "DB Library.lvlib" (indicating that the DB connection couldn't be established), or from "SmartMotor.lvlib" (indicating that the SmartMotor connection couldn't be established). I want to be able to handle these two cases differently in all of my projects. What I would ideally like is to capture any error -2147467259 from DB Library and replace it with one custom code and message, saying something like "Network Error: Restart computer and check your wifi before calling me down there.", and similar for SmartMotor.lvlib.

 

I've read about Defining Custom Error Codes to Distribute throughout Your Application but I'm not sure how to take the information from that and apply it to my situation. As always, any help is greatly appreciated.

 

Capture.PNG

Fasted way of stripping 18 bit samples from UDP packet

$
0
0

Hi All,

 

I'm hoping someone will be able to point me in the right direction for the best way to dissect large UDP packets that contain 18 bit data samples. I'm new to labview with my experience being more on the electronics/embedded C side.

 

The UDP packets that I'm reading are 1200 bytes long. I'm able to strip out the Ethernet header, IP header and UDP header using the "Unflatten from String" function without issue, which leaves me with the IP data which is 1158 bytes long.

 

There is then 78 bytes of hardware status information and the remaining 1080 bytes is made up of three blocks of 360 bytes, each of those blocks consists of 160, 18-bit samples from an 8-channel ADC (160 samples per block, 480 samples per packet). I've gotten as far as breaking the packet into those blocks, but the best way to break it into individual samples is something I could use help with.

drak_0-1598885837029.png

 

The only way I can think of separating the data into 18-bit groups in Labview is to convert it to a boolean array and then parse it, but this seems very clunky.

 

I'm sure I can brute force something together that works but the VI will need to parse 1000 packets per second, so speed with be an issue. If anyone has any high level recommendations that would be great (don't expect anyone to build this for me - just pointing me in the right direction or making suggestions would be fantastic).


Cheers,

Labiew Runtime on Ubuntu Linux

$
0
0

I have a LabVIEW application that I have developed and run in the LabVIEW development environment on Linux.  I compiled it on linux using the application builder.  That all worked great. 

 

The problem is that the runtime is not found despite being installed when I try to run the compiled application.  I realize that Ubuntu is not officially supported.  I have tried adding symbolic links as suggested in the link below from 2007.  

 

https://forums.ni.com/t5/LabVIEW/Installing-Linux-Runtime/m-p/558739#M262408 

 

The error that I am getting is

"Can't find library libNILVRuntimeManager.so
Make sure this library is installed in your LD_LIBARY_PATH

search path, or in /usr/lib64"

 

There is also a similar message for liblvrt.so.20.0.

 

I'm somewhat tied to Ubuntu because of some other software needed for the project.  Any suggestions would be much appreciated.

Frequency Counter Output (USB6351) with fixed number of pulses.

$
0
0

I want to be able to output X amount of pulses and a particular frequency.  So for a stepper motor control, I would say want 40 pulses sent with a 500hz frequency and 50% duty cycle.  I want to be able to vary the number of pulses and/or frequency as needed on the program.

Getting address errors when trying to access Wago 750 PLC modules

$
0
0

Hello all.  First off, I know there are many topics dealing with this kind of issue, but the problem is that links that are given in those topics always come back with a 404 Not Found, so I can't follow what suggestions people have given because I can't get to the pages they link.

 

So I have a Wago 750-8101 controller with the following modules attached:

 

750-458 - Thermocouple module

750-1407 - 24V input module

750-1504 - 24V output module

 

I am trying to use Labview Modbus to read the modules.  For my immediate need, I am trying to read the 458 thermocouple module.  Attached is the program I am using.  The pictures show the error I get as well as the plc addresses for the modules

 

I have done some other research, and seemed to recall something about using Network Shared Variables to access the modules.

 

Why am I getting the error when I am using the addresses the plc is giving?

 


Reading a control from LV Built application.

$
0
0

I am trying to establish a VI Server connection between a LV VI that is in the development environment and an executable that was built using the LV Application builder.

So I built an application that increments an indicator (name: "numeric") once/sec.  This is called "Test Exec.app" which is built from the single VI "Test Exec.app".  My main LV preference for LV 2020 is actually 3376 to keep from version collision.

I edited the "preferences" file for that application to have the following:

server.tcp.enabled=TRUE
server.tcp.port=3374
server.tcp.paranoid=True
server.tcp.serviceName="My Computer/VI Server"
server.tcp.access="+127.0.0.1;+localhost;+*"
server.vi.callsEnabled=True
server.vi.propertiesEnabled=True
server.vi.access="+*"

Now I try to open a connection to this application on port 3374 which seems to work.  And then a connection to a VI that does not. The only app that it connects to is LabVIEW.app and not my built application even though LV is restricted to another port.  Of course trying to open a link to my application front panel fails as that VI is not found.

 

The documentation seems to imply that this can be done, but the details seem to be lacking.  Why is LabVIEW on both ports (3374 and 3376)???!  And if I am connecting to LV on the port, why does it not show the executable?

 

Test Exec.png

 

 

Flickering grpah, Listbox selection

$
0
0

Hello Everyone,

 

I'll be quick with this one; I'm using a Listbox to set active plots on a graph. The flickering starts when selecting 2 or more names. I've tried placing decorations on the graph and timers to slow down the loops, no luck there... The flickering graph is always every other one. I would like to have the flickering to stop somehow.

 

To see a scenario, probe at "14" and select the names "Bob 2-4" ("Bob 3" flickers). 

 

 
 

 

Producer Consumer update time

$
0
0

Hi NI Community,

 

I'm setting up a three loop (1 producer, 2 consumers) program. The producer loop collects data then sends data to two other consumer loops for data processing and plotting. The problem I'm seeing is my producer loop has an update time of 100ms so the data that gets sends to the other loops does not look continuous. I attached the image below. As you can see, the producer loop's data looks smooth but the other 2 loops look like dash lines. How do we make it so other loops also look continuous? I also attached the code in this post. producer consumer.PNG

 

Thank you!

Community Edition Compatibility with full license.

$
0
0

I have fully paid Labview 2017 installed and have had good success with my projects, both 32 and 64 bit.

 

I would like to explore the possibility of Raspberry Pi and Beagle Bone deployments for my yacht and have just downloaded the Community Edition. Before I hit the install button I would like to know if I can have both versions (Labview 2017 and Community 2020) sitting side by side on the one PC without any problems.

VI to update excel report every time is ran

$
0
0

HI all,

Im new to the LV world and i was wondering if someone here can help me with my current issue.

Im trying to create a Vi that every time its ran it records the selected values into a spreadsheet(template) and saves it. 

so far i have i working as mention before, the issue is i dont want to create a new report every time the Vi is run  but to update the same report by moving one row down in the spreadsheet.

 

So lets say I run the VI to check a voltage and current, it records the values (which i get it do so ) in row A1 and A2.

Next day I run it again and it should record the values in the same spreadsheet but B1 and B2 and so on and on.

I do get it to work if i use the write to delimited spreedsheet VI but that is only for .CSV and i needed to be on a excel file because the template is a report  that has its own format and conditions  

 

 

below is a screenshot of the Vi ,any ideas on how to get the Microsoft parameter cluster to increase  by 1 every time the VI is ran.

Thank you

Shawn19_0-1598932784729.png

 

How to read data from excel and plot a graph?

$
0
0

Hi All,

I have an excel file containing the temperature data in one column and respective time at which temperature is updating,i need to plot time v/s temperature in a graph.

 

Can anyone guide me the steps to read both temperature and time data from excel and writing it to graph without changing the input format of the file to csv. The input format of the file is .xls

 

can i do it with the help of activex and excel?I am not much familiar in using activex,so it will be of great help if anyone can help me,or any other simplest method other than this is also fine 

FFT on FPGA

$
0
0

Hello,

I'm trying to make the FFT of a signal comes from a P2P FIFO.

I have a VST connetced via P2P to a flexrio. In the flexrio I received an array (A) of 16 elements of I16 type. The elements are the I, Q components of the signal, in other word I have the elements:

A(0) = I(0), A(1) = Q(0), A(2) = I(1), A(3) = Q(1)... A(14) = I(7), A(15) = Q(7).

How can I make the FFT? 


LabVIEW Unit Test Framework: Test Vectors cause VI output to always be 0?

$
0
0

Hello, I'm trying out the Unit Test Framework. I'm struggling to make Test Vectors work correctly.

 

My unit test simply involves 1 VI that takes 2 numeric inputs and outputs their average.

Average.vi.png

 


When I manually set up every single test case and don't use Test Vectors, I get the expected results:

 

Manually entering every test case: The VI's outputs correctly reflect the inputsManually entering every test case: The VI's outputs correctly reflect the inputs


However, when I apply the same inputs using Test Vectors, my VI always outputs 0 no matter what the inputs are:

 

Using test vectors: The VI's outputs are always 0Using test vectors: The VI's outputs are always 0


 

What's going on? (Test files attached -- LabVIEW 2020)

SubVIs in main VI

$
0
0

Hi all,

 

The goal of my application is to read data from three subVIs simultaneously, each representing a different NI module, and put this data into a 1D array that is continuously being updated while the VI is running.

 

When I run my code with simulated hardware all three subVIs run at the same time and their data is being continuously updated but the main vi is not.

 

The array in the main VI is not updating.

 

erabrannan_0-1598949873885.png

 

How can I change that?

 

-Emilie.

 

 

 

How to make a *.iso file for cRIO target

$
0
0

Hi all, I've a problem. I need to test\update a project designed for cRIO 9045 target but at moment a real target is not available so I try to found a different way.

An alternative, not a full alternative, could be use a VM to emulate the real target but to make the VM is necessary the *.iso file and the RDA tool generates a *.lvappimg file.

Do you Know how obtain the iso RTOS immage from real target or other source ?

 

Thanks in advance

Generating Custom errors without using Labview error cluster

$
0
0

I have a requirement of generating custom system level errors for highlighting error conditions to the user of the application. These errors are generated across different VIs in my application and are intended only for user notification. I merely display these errors to the user and not react on that. Unlike LV errors, these errors do not in any way affect the application functioning.

 

In my previous project, I had used hard-coded strings. But they were difficult to maintain due to issues like

- Same error code with different error messages.

- Different error codes with same error message.

- Inability to trace all errors.

- Export all errors to a file (If I want to create a error table for user manual, it was always manual work of going to each subVI and copying all the constant strings.)

 

I tried to use the LabVIEW error code editor and Gpower error and warning tool-set but both of them were using LV error cluster to propagate the errors. This will not work in my case because the errors I generate are just notifications. I do not want to stop other LV blocks from executing when this custom error is generated.

 

Is there any way to do this in a way that can be scalable and maintainable and also when I want to export out as a file, I can do it easily.

PID Setpoint Pause

$
0
0

Hello,

 

I'm using labvew 2019, and in my project I use a PID setpoint profile.

during the test would be very useful to pause the profile, for an indefinite time, and to be able to resume the profile exactly where it left off.
In the attached VI I can pause the Setpoint, through the Pause button, but when I press the button again to resume the profile the time does not start from where it was interrupted but takes into account all the seconds spent in pause.
Does anyone have any idea how to solve it?

Thanks
David

Viewing all 69009 articles
Browse latest View live


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