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

How to input both new data and state data with RMS pt by pt?

$
0
0

Hello,

 

I am a newbie trying to take a very simple vi that reads and displays raw and RMS(ptbypt) of voltage from a single channel and upscale it to read 8 at once. 

 

My question revolves around getting the RMS ptbypt to work inside the for loop. I believe that I need to wire the auto indexed measurement to the RMS vi, then wire the output into a shift register to build an array of the outputs for each channel. I'm struggling to understand whether calling the RMS ptbypt vi inside the for loop will work the way I want to it though. Am I re-initializing the function every time I call the for loop and just getting a result for one value? If so how can I input both the new data and the state data into the function to be processed? 

 

I have attached the code I'm trying to upscale, as I am still struggling with the new version. I will post my best attempt if it would help. Thanks all,

 

-Bryan


Labview installation

$
0
0

Hi everyone. 

 

I need a help. 

 

I have a labview software 2011 (yes, is old), but I have the serial number from installation. I'm not able to install it in new computer with windows 2011 64 bits. Someone knows if is there any incompatible issue? I'm try to install it, but every time apers the follow errors.  

 

Daniel_1234567890_0-1740512445716.png

 

Someone can help me to understand this issue?

NI-DAQmx Python: How to control same AO channel with finite and continuous sample mode?

$
0
0

Hello!

 

I am working on code to write a sinusoidal signal with frequency 71 Hz and varying amplitude from an AO channel. I would like the amplitude of the signal to ramp up at a constant rate from 0 to A. Once the amplitude reaches A, the signal should continue indefinitely with regeneration until interrupted by user input. Upon user input, the signal should ramp back down to 0. An example is illustrated below.

image.png

 

I believe the ramp up/down outputs should utilize FINITE sample mode (it only lasts for a finite time until the signal reaches amplitude A or 0), whereas the steady-state output should utilize CONTINUOUS sample mode (it lasts for an indefinite amount of time until user keyboard input). Furthermore, the ramp up/down should transition seamlessly with the steady-state portion, without any discontinuities in voltage. I am not sure how to achieve this.

I have tried writing different variations of code with the nidaqmx Python API to achieve this. A snippet from one variation is shown below:

 

 

electrode_dict = {'electrode_x+':'PXI1Slot6/ao17', 'electrode_x-':'PXI1Slot6/ao21', 'electrode_y+':'PXI1Slot6/ao0', 'electrode_y-':'PXI1Slot6/ao8', 'electrode_z+':'PXI1Slot6/ao12', 'electrode_z-':'PXI1Slot6/ao4'} electrode_x_dict = {'electrode_x+':'PXI1Slot6/ao17', 'electrode_x-':'PXI1Slot6/ao21'} electrode_y_dict = {'electrode_y+':'PXI1Slot6/ao0', 'electrode_y-':'PXI1Slot6/ao8'} electrode_z_dict = {'electrode_z+':'PXI1Slot6/ao12', 'electrode_z-':'PXI1Slot6/ao4'} def XeFlashes_new(task_spin, sampling_rate_AO, f_e=6.23e3, amp_e=2, ramp_rate_e=0.05, axis='none'): duration_ramp = amp_e/ramp_rate_e waveforms_up = [] waveforms_down = [] waveforms_spin = [] if not axis=='none': # choose which channel(s) to output waveform(s) on if axis == 'X': spin_electrodes = [item for pair in zip(electrode_y_dict.values(), electrode_z_dict.values()) for item in pair] elif axis == 'Y': spin_electrodes = [item for pair in zip(electrode_z_dict.values(), electrode_x_dict.values()) for item in pair] elif axis == 'Z': spin_electrodes = [item for pair in zip(electrode_x_dict.values(), electrode_y_dict.values()) for item in pair] else: raise Exception("'axis' parameter is not recognized. Should be 'X', 'Y', or 'Z'.") for vv in enumerate(spin_electrodes): # add analog output channels for electrodes cc = task_spin.ao_channels.add_ao_voltage_chan(vv[1], min_val=-4, max_val=4) cc.ao_term_cfg = TerminalConfiguration.RSE # ramping time t_ramp = np.linspace(0, duration_ramp, int(duration_ramp * sampling_rate_AO), endpoint=False) # create waveforms for ramp up waveform_ramp_up = (t_ramp * ramp_rate_e) * np.sin(2 * np.pi * f_e * t_ramp + vv[0] * np.pi/2) waveforms_up.append(waveform_ramp_up) # create waveforms for ramp down waveform_ramp_down = (amp_e - t_ramp * ramp_rate_e) * np.sin(2 * np.pi * f_e * t_ramp + vv[0] * np.pi/2) waveforms_down.append(waveform_ramp_down) # create one period of waveforms for continuous section t = np.linspace(0, 1/f_e, int(1/f_e * sampling_rate_AO), endpoint=False) waveform = amp_e * np.sin(2 * np.pi * f_e * t + vv[0] * np.pi/2) # each adjacent electrode is phase-shifted by pi/2 waveforms_spin.append(waveform) # allow regeneration task_spin.regen_mode = RegenerationMode.ALLOW_REGENERATION # configure timing task_spin.timing.samp_clk_src='OnboardClock' task_spin.timing.samp_clk_rate = sampling_rate_AO task_spin.timing.cfg_samp_clk_timing(rate=sampling_rate_AO, sample_mode=AcquisitionType.CONTINUOUS) # ramp up for finite amount of time task_spin.write(np.array(waveforms_up)) task_spin.start() task_spin.wait_until_done(timeout=duration_ramp+1) task_spin.stop() # output sinusoids until user keyboard input task_spin.write(np.array(waveforms_spin)) task_spin.start() input('Generating voltage continously with regeneration. Press Enter to stop.\n') task_spin.stop() # ramp down for finite amount of time task_spin.write(np.array(waveforms_down)) task_spin.start() task_spin.wait_until_done(timeout=duration_ramp+1) task_spin.stop() return

 

 

Currently I encounter an issue where wait_until_done() cannot be used in conjunction with AcquisitionType.CONTINUOUS, as it is intended for finite acquisition. I have also tried controlling the same channel with two separate tasks (one task created with finite sample mode, the other with continuous sample mode), but this results in a resource error, as nidaqmx does not allow the same channel to be controlled by two tasks simultaneously.

 

A similar functionality has been successfully implemented in LabVIEW, so I believe it is achievable in Python as well. I'm open to any suggestions on how to fix/rewrite my code.

 

Thank you!

What could change after a baud rate increase to slow down serial communication?

$
0
0

Hi

I have been using Plasmionique Modbus Master library for several years, on two separate systems, just reading a standard modbus server at baudrate 9600 through an Easysync RS485 serial converter. All works fine rock solid.

Now I am trying to stream data at 100ms intervals and have upped the baud rate to 38400. Since I updated the baud rate (twice) it has briefly worked fine on both systems but then  starts running much slower about 7-800ms reading interval. By looking at Max/ Devices and Interfaces; Visa Interactive Control  and Windows Device Manager I can see that the baud rate is saved correctly and the aliases are correct. There is only one thing that I can find that might be a problem on one of the machines and that is Visa Interactive Control cannot access the relevant com port - as shown in "visa2" png below. But I think that might be just because Labview is using it.

I have tried uninstalling all the com ports and changing the com ports being used by Labview. It seems that NI Visa and MAX weren't installed when I made the changes but since the problem occurred I have installed them. I have LV 2022 Q3.

 

I have been at this weeks now and would really appreciate any suggestions.

 

Using labview code of a USB-6003 on a USB-6001

$
0
0

I have recently came across a simple voltage measurement of a generator output. 

The voltage across the positive and negative wires is measured by a USB-6003. I cant use the 6003 for personal use but I can use the code. I want to run the exact same experiment of voltage measurements but dont want to spend an extra 800 dollars on a USB 6003, I would rather spend 400 dollars on a USB-6001. But would the code that was designed for the 6003 run on the 6001 the same? 

It is a simple two wired experiment of voltage graphing. 

Tree control: Identifying drop between items

$
0
0

I'm having an issue with the tree control(LabVIEW2019 SP1 f5):

When I set the property that “Allow Dropping Between Items”, I need to find a way to get which item being drop is between the two items, unfortunately I haven't found a solution to this problem at the moment.

I need to know if the item being dropped is on a line or between two lines.

Does anyone know how to solve this problem?

GIF 2025-2-26 13-23-36.gif

changing namelabel text on dual Y-axis chart

$
0
0

Hi Guys,

I need to chart temperature (degC or fahrenheit) and loadcell (newton or kilonewton) on one chart. I plan to use multi signal graph with dual Y-axis. I use option button to select and block diagram to change the Y-Scale name label text. Problem is the changes only change the right side Y-scale. How do I change the left side Y-scale?

Magtrol TS106 Error

$
0
0

I am ring to run an example VI magtrol TS Aquire Signal.vi and when I run it I have an message "Error -1074000001 occurred at Magtrol TS 1xx.lvlib:Write-Read Check.vi" 

Possible reason(s):

Command "*IDN?"

Error:
No returned data after sending query

Solution:
Correct the format of command

 

I see the device in NiMax and I am able to read the device through the USB with the Magtrol software.   I have installed the drivers and see it on the installed instrument drivers.  Any help would be greatly appreciated.


Setting IDLE state on the main VI from a Sub VI

$
0
0

Skip below to read the english version of the question, first i will ask in Italian because is my mother lenguage. 

 

Ciao a tutti, non sono molto esperto di labview e da qualche mese mi sono messo a imparare ad utilizzare questo software sviluppando parti di programmi dove lavoro. Fatta questa premessa la mia domanda è la seguente: Come faccio a mettere in pausa (Idle) la mia VI principale da una subVI? Ho bisogno di questa operazione per poter aggiungere oggetti tramite VI scripting alla VI principale ( Se non è in IDLE non posso modificarla). Una volta finite le modifiche ho bisogno anche di rimettere la VI principale in run. Finora ho provato varie strategie (anche suggerite dalla deficenza artificiale) come il nodo SetBusy, ho provato anche con proprietà e invoke node ma niente non ne vengo fuori e ottengo in varie situazioni questi codice di errore: 1000;1026 e 1055.

Avete una soluzione semplice, diretta e funzionale per risolvere questo problema??? Grazie in anticipo a chi troverà il tempo per rispondere, in caso di bisogno domandate pure e provvederò ad aggiungere ulteriori informazioni appena possibile.    PS: sto usando labview 2021

-------------------------------------------------------------------------------------------------------------------------------------------------ENGLISH-------------------------------------------------------------------------------------------------------------------------------

Hello, i'm new with labview and i'm still learning so i need your help (AI didn't help out much). i need to do the following things in my program:

1) at one point (Init phase) automatically set the idle state of my MAIN VI (When needed and only one time) 

2) from SubVI i need to create via scripting some objects in the MAIN VI ( But it have to be on idle state or will give me back error)

3) When exiting from the SubVI i neeed to put on RUN the main VI and keep working with my main VI 

4) The solution have to be reliable and easy to use! 

 

I already tried many ways without success, it's seems that i can't properly set those function like:  set busy, invoke and property nodes, notifier and other ways that always gives one of those error: 1000; 1026 and 1055. 

PS: i'm using labview 2021

 

 

 

.net with APP Builder

$
0
0

I have a problem with the Labview APP Builder.

After changing from Labview 22 to Labview 25 I have the following phenomenon in my EXE:

I call a DLL (.Net Framework) via a consturctor node and close it directly (for testing).

When I do this in my main everything works

If I place this call in one of my Actor SubVis, I get an error message when starting the Actor, because one of the associated Vis is faulty. (At the same time, the call works in the Main)

In the Dev. environment the call works without problems.

Add CHR19032.dll to the installer

$
0
0

I created a program using LabVIEW 2015 to control the Chroma ESA Model 19032 Tester using CHR19032 drivers. It works perfectly on my development computer. However, when I deploy the program to a test computer, I get errors saying it can't find the CHR19032.dll.

slezingerb_0-1740583635376.png

 

 

I have added the CHR19032.dll into installer under “System” folder:

slezingerb_1-1740583635377.jpeg

 

 

I've verified it's in the SysWOW64 folder after installation. What am I missing?

Is it possible to generate a LVCompare report from the command line?

$
0
0

First, I've read this documentation and seen this thread (from ten years ago). I'm using LV2019 but have the capability to update to 2024. 

 

I'm using BeyondCompare to monitor changes across SVN commits for a large project, and I have configured it to use LVCompare to compare files. The issue is that BeyondCompare can only see that the binary files are different, and then I need to click through each of the (650, today) files that have changed between the two commits. It seems like, especially with the object-oriented VIs, I'm getting a ton of trivial changes, like "VI Icon" when there is no discernable change to the VI icon. I can't just ignore this, though, because there have been some VIs that have changed the terminal configuration, and that is a notable change that does warrant review. 

What I need is a way to have LVCompare generate the report from the command line.

 

I can script BeyondCompare to give me a list of files that are different on a binary basis, and if I could get a command-line mechanism for generating an LVCompare diff report then I could generate one for each file that BeyondCompare says is different and aggregate those reports to filter out things like diffType="VI icon", etc., then I can have BeyondCompare filter the files that aren't flagged as notable. 

Help/Ideas on Cleaning a Section of Code

$
0
0

I have a state machine in relatively clean condition, but the “take measurements” state is quite messy and would like some feedback on making it more readable/useable for others coming in after me.

 

The program takes a list of steps in a sweep, takes the measurement at each step, outputs to a graph, repeats based on the number of cycles given, and if enabled repeats all of that for each step in the sweep of a back gate/power supply. Based on whether the back gate is enabled or not, output is altered slightly, which is what the case structure on the bottom half is for.

 

I've considered changing/reordering my data control/type def file, but I'm not sure if making any one of the clusters more compact would be a good idea, or which bit of data would work best in which cluster.

 

I also need to attach the error output of the measurement VI to the loop's stop condition, as well as the error stream below, but I wanted to attempt to tidy up before adding any more to the mess.

 

I've attached a screenshot of the state in question, as well as an edited version of the program containing only the state in question, hopefully it would be enough but I don't know how helpful or broken it will be without the custom VIs (I've never posted code here before). If having more of the code would be helpful, I might be able to post, but I'm not sure how much of it you'd want. I also don't work every day but I'll try to respond asap.

ULx Read (Analog DBL 1Chan 1Samp).vi Error number 300 has no text

$
0
0

I run into this issue with the box USB-1608GX-20A.  This is the issue "ULx Read (Analog DBL 1Chan 1Samp).vi<ERR>
Error number 300 has no text".  I even ran the example VI in LabVIEW and it gave me same error.  If any of you have encountered this issue and knew how to solve it, may you please let me know?  Thank you very much.

cRIO-9030 stuck in Install Mode after RAD

$
0
0

Hi all. I have a cRIO with legacy software, drivers and RTOS from 2016. For record-keeping I attempted to image it using the RAD Utility per an older manual. The image extracted successfully but I cannot for the life of me get the thing out of Install Mode. Manual resets, power cycles, etc simply boot it back up into install mode. The cRIO is a legacy dev machine we keep around to help troubleshoot some support cases so it would be nice to get it back in operation!


Unexpected Data Points & Missing Higher Values in 3D Scatter Plot

$
0
0

Hello NI Community,

I am working on a LabVIEW program that processes digital inputs (lines 0-15) using interrupts and visualizes the data in a 3D scatter plot with:

  • X-axis: Lines 0-7
  • Y-axis: Lines 8-15
  • Z-axis: Interrupt occurrence count

However, I am facing two issues in my plot:

  1. Unwanted points appear on the X-Y plane that should not exist.
  2. Higher Z values disappear when a smaller X or Y value is detected.

I have attached screenshots of my block diagram, scatter plot, and data table for reference.

I would appreciate any insights on how to fix these issues!

Thanks in advance for your help.

Attachments:

  • 3D Scatter Plot output
  • Data Table

Communication between Labview 2024 and Inclinometer with CAN Open messages

$
0
0

Hi i've the followwing issue:

 

I need to send/recive Can Open messages from Labview 2024 to Inclinometer board using Peak CAN usb adapter.

I tried downloading and using the Can Open NI libraries, but it seems that they are unable to communicate with the Peak (it gives me the error in the attachment when I try to open connection to the Peak,i think it's because Peak isn't configured in the NI MAX but I don't know how to configure it), instead through the CAN Basic libraries I can communicate with the Peak but it only sends simple CAN commands, not CAN Open.

How can i do?

array manipulation from fpga to tdms

$
0
0

Hi Labview community,

 

i'm working to optimize my code.

i acquire data from fpga using DMA

i read DMA in real time vi and i need to manipulate it before logging it usind advanced tdms write

data manipulation means that: reducing size of DMA (desampling) but having also option for averaging

 

i need help to understand which is the better way. i used to manipulate like:

Michele___2-1740654041032.png

 

 

I NEED HELP TO:

A) is there a vi similar to Decimate (continous).vi that allow me to pass direct the array interleaved data that come from FPGA without access it to retrive channels? there is something that accept data I32 or I16 instead of DBL (5 picture above)?

B) which is the best way (1, 2 , 3 or 4 picture above) to prepare FPGA array to TDMS advanced write?

C) data to TDMS advanced write could be interleaved or not, it depends by the way i prepare it. which is the better way?

 

in the real application that could be some real order of data:

 

PXI

20/30 channels at 500KHz logged continous

20/30 channels at 100KHz logged continous

100/150 channels at 1 KHz logged continous

 

CRIO

10 channels at 500KHz logged short time

50/100 channels at 1 KHZ logged continous

 

thank you for support

 

Michele

 

How to Convert 1D Array of Digital Waveform to Decimal Numbers in LabVIEW?

$
0
0

Hello NI Community,

I am working on a LabVIEW application where I acquire digital signals using DAQ Assistant. My goal is to convert a 1D array of digital waveforms into two separate decimal (U32) numbers.

Current Approach:

  • I am reading 16 digital lines (0-15) as a 1D array of digital waveforms.
  • I split the array into two parts:
    • First 8 lines (0-7)
    • Second 8 lines (8-15)
  • I need to convert each 1D subarray into a U32 decimal value.

Issue:

  • The "Digital Waveform to Binary U32" function requires a single digital waveform, not an array.
  • I am unable to directly connect the 1D array of waveforms to the function.

Question:

How can I correctly convert each subarray of digital waveforms into a U32 number?
Are there any LabVIEW functions or workarounds I should use?

Any suggestions or example VIs would be greatly appreciated!
Thanks in advance.

Multiple RS485 Devices connected via USB Converters

$
0
0

Hi, 

I have multiple devices that needs to be connected to PC via USB Hub. 
Now the thing I'm worried about is how do I program it so that I can have address of each device separately.

1) I need to know from software point of view how should I get started?
2) Data can be lost due to data collision because two or more than two devices can send data simultaneously?






 

Michael_Smith_0-1740655503169.png

 

Viewing all 67124 articles
Browse latest View live


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