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

LV does not Find Callers of a parent method inside of a child's (different) method.

$
0
0

I observed this behavior in LabVIEW 2016.  A simple example that you may use to reproduce this is attached.

 

I created a dynamic dispatch method (Open) in a parent class (Logger).  In a child of Logger (Event Logger), I created a method (New File with Header) and placed the parent method Open on its block diagram.

 

If I right-click on Open and choose Find Callers, Open is not found.  If I change Open to a static method, then Find Callers is able to find it.

 

My primary question is: Is this behavior intended?

 

Secondary discussion: Perhaps creating a dynamic dispatch VI, not overriding it, and using it in a child method is not an ideal approach (if so, LabVIEW not finding its callers is a subtle way of enforcing the point). Alternatives are to just make it static instead, or to override it with a child Open that simply calls the parent (Find Callers is able to find it in that case as well).  I am open to your opinions about this.


Is labview the right software for me to test a cam shaft position sensor(FAST sensor)?

$
0
0

For the past week i have been making a code for my cam shaft position sensor(basically sends a 1 for every 1° of the motor) the motor can go 10k rpm ,thats almost 60000 digital readings per second, im using an arduino to take in the readings, the arduino can take 16Mhz so i think that is more than enough, is labview the right software for me?.  

i have finished my labview program, and if i rotate the cam shaft by my own hand at a slow speed, it loses a lot of signals.  

is there something i can do to speed this up or i should go suicide because i didn't research such a thing before working on my code

Scale and Calibration of Load Cell

$
0
0

I am having trouble with the scale configuration for an omega s-type load cell.  I cant seem to get any accurate numbers.  Can someone help me set up the DAQ Assistant for the ni9237 module accurately with the given data.

 

I have the calibration data attached.

Implementing SubVI with feedback node in a For Loop

$
0
0

Good day programmers,

I have a discrete subVI that I would like to implement in a For Loop. The SubVI depends on values from previous loop iteration (While loop iteration), i.e. there is feedback node/shift register inside so if you just implement subVI in the For Loop as is, the previous value in the SubVI is going to contain value from the previous For Loop iteration value not the actual value from the previous While Loop operation. How do we go around this?

As a simple example, let me use the discrete pt-by-pt moving average VI.  I have attached a For Loop Test.vi in which I have an array of 4 values that are offset with random values on top of for noise injection. Then I have independent 4 pt-by-pt moving average block running in parallel and one pt-by-pt moving average block in the For Loop. You can see that each For Loop iteration value affects the previous value in the moving average block.

 

  1. Can you delay the iteration inside of the SubVI by the number of elements in the input array (i.e. array size)? Will this work? But there is no such thing as dynamic feedback node with a variable delay like the FPGA Discrete Delay block.
  2. Alternatively we can force feed the current value and previous value to the SubVI inside the For loop. This sounds messy.

 

It would be really nice to be able to implement such SubVI as the ptbypt moving average for a variable size array. That way you don’t have to index the array and do it individually element by element. Seem like it should be simple but I can’t figure it out.

 

I hope my explanation of the problem is clear enough. I appreciate any advice.

Ren

 

How to handle quadrature encoder pulses when the rotation direction changes

$
0
0

I'm collecting data from a quadrature encoder (channels A, B, M/marker/index) with a NI 9411 with LV FPGA where I stream changes (positive going or negative going transitions along with logic state of the other 2 channels) on A, B, and M to LV RT (Linux-based cRIO-9030)  along with a U64 FPGA timestamp (25 nsec resolution; sample period is 500 nsec, limited to 9411 speed) to LV RT which stores the data to a USB hard drive.  I collect about a hundred gigabytes/day which I post-process in LV-Windows, looking for the needle in a haystack.

 

The reason I am doing this is because the drive the encoder is connected to sees an incorrect number of counts on channel A or B or both when the index/marker pulse is seen, which happens when the drive is commanded to move in a direction (doesn't always happen).  I see the same problem in the data I collected...no problems once the dyno is up and running in one direction.

 

Today I discovered precisely what is going on and seems to be a problem with how a quadrature encoder works.  If the encoder is rotated ever so slightly back and forth such that only one channel (A or B) changes state, the counted pulses on that channel will always increment or decrement (depending on the non-changing state of the other channel).  Attached pictures show a) LV-Windows code to process the LV-RT data (count pulses), and 2) screenshot of an Excel file showing an extra pulse on channel B while channel A doesn't change.

 

I very well could be wrong with the conclusion what I am seeing is a fundamental flaw with a quadrature encoder...maybe the LV code to count pulses could be improved, but the logic I used matches several other examples of code I have seen on the internet.

 

Comments?

 

Thanks,

 

Todd

Panes without splitters [VI-Scripting, Labview, front-panel, splitter, panes]

$
0
0

Hello!

This is an exploratory 'is this possible' post rather than a demand for complete solution.

I want to create a front panel with two panes but has:

  • No splitter
  • 0-pixel splitter
  • transparent splitter.

I cannot rely on this splitter being the same color as the background color.

 

Why?

I am trying to create an x-control with some complex sizing. currently I have to problematically move everything on resize, and this would be so much nicer.

 

Dynamically change logic families of DIO channels on FPGA PXIe card

$
0
0

Is there a way to dynamically change the logic families of DIO channels on a PXIe card running an FPGA application (specifically, I'm using a PXIe-7820R)?  The timing of this switching (and this particular test, for that matter) aren't at all critical, so I'm seeking methods that could include both changing them in the actual FPGA application, or changing them in my host (Windows) application, but NOT in the LV project explorer or MAX.  Essentially, I'm trying to do what's pictured below, but for a PXIe-7820R:

 

 

image.png

TCLK Synchronisation error requires computer restart

$
0
0

Hello

I am using a PXI chassis with an MXI card, and synchronising a PXI-5122 digitiser with a PXI-5412 FGEN using NI-TClk.

I configure the TClk session in the conventional way (I think!) as so:TClk question 3.png(Apologies for the broken wires - I tried to take a snippet of a bit of my VI rather than the whole lot, which I unfortunately can't release.  However, it works fine so no need to worry too much about it!)

Then the program runs, and works fine, and then at the end I release the devices as follows:TCLK question2.png

And this also works fine.

The bit that doesn't work is if a user sets a combination of settings that aren't allowed, for example capturing more samples than is possible with the onboard memory.  Then, despite the fact the snippet above still runs on exit, I am unable to use the cards again without shutting down the computer and re-booting it.

The error I get then comes from the "niTClk Sychronise.vi" and says:NI TClk problem.png

I can, of course, check for all possible permutations of options for the cards and prevent incompatible options.  These are strictly in-house applications, though, and I would like to give my users as much flexibility as possible, so that would be quite a task.  I'm not complaining though - I know it's the right thing to do but I don't write perfect code first time every time so there will still be some testing and the occasional time when something slips through.

It seems wrong that even during my testing there will be times when I have to shut down the whole rig just to get up and running again, and quite a waste of time - so my question is:

 

Is there something I can add to the 'standard' combination of niFgen Abort Generation.vi, niFgen Close.vi and niScope Close.vi, which will force the cards and TClk session to be released regardless of their state (i.e. if they have hung)?

Thank you!

P.S. This is for a built application - running the code from LabVIEW itself I don't have the same problem.

 

 


Kalman filter example "CDEx Kalman Filter" - how to make position as an input?

$
0
0

Hello,

I would like to implement a Kalman filter for a simple mechanical system to estimate the velocity given a measurement input of position (which will eventually be achieved with measurement hardware). The scenario is that I would like to use an ultrasonic sensor, which measures position, along with a Kalman filter to estimate the velocity of a toy car in motion. To begin, I have started with one of the built-in examples in LabVIEW: "CDEx Kalman Filter". So far, I believe I have entered the appropriate matrices for A, B, C, and G, given the following state space:

state_space.png

My question is: what are the input(s) to the system in this VI? The way that I have it set up right now looks like the input (the "inputs" terminal to the "CD Linear Simulation" block) is acceleration, not position (which I made constant). Is this correct? How can I make position as an input? How would I change the state space accordingly? Thank you.

SPI communication with cRIO and manufactured module

$
0
0

Hello,

I am new in labview and in the FPGAs field, and I am trying to make a spi communication between a manufactured board and the cRIO 9038. For this project I was reading the CompactRIO Module Development Kit User Manual. Once the PCB is done and the program in my own FPGA in VHDL for the slave is inserted,  the next step is to design the interface in labview, and it is when my problems start...

The first step is to write an EEPROM, for that, it is necessary to create a text file with all the values of the board (EEPROM Size, ID vendor and product, module model code..). This process has to be executed when the cRIO is in mode ID.

Another file is created too, the ModuleSupport.xml.

In this point I am starting to be confused, because I don't know what I have to write in this last file. In addition, for making the SPI the mode of the cRIO has to be changed to normal operation mode, so this needs to be configured in the xml file, how?

I am using SCTL I/O Items to make the part of the master in the communication, should I write about them in the xml file too?

I would appreciate any answer and thank you in advance!

Overlay the intensity graph onto an image

$
0
0

Hollo—Anyone knows how to make the Intensity Graph transparent? I need to overlay the intensity graph onto an image. I tried to the “Plot Image” but unlike other graphs Intensity Graph only has “Plot Image Front”, which is not I want. “Plot Image Back” would work.

Thanks

WB

Edit Icon VI programmatically

$
0
0

I have on my project a lot of VIs that have the same Icon and I would like to change icon in every VI. My demo icon contains two icons text and those are I want to change but one by one is a hard job. I need help if there is someone that knows how to change the icon text programmatically maybe with Scripting module o something.

 

I hope you can help me, please.

 

See you

 

Carlos Luevano

Test Engineer at IPTE Mexico

CLAD

50MHz Arbitrary Waveform/ Function Generator 3390

$
0
0

Hello,

I am new in learning Labview 2013. I have the Labview programm about the function generator 3390. My problem is that how can i  set up a periodic Ramp wave with idle time intervel (5s)? and the idle time interval can be changed bei labview programm.

 

Thanks a lot

Can LabVIEW generate a real time 1800HZ sinewave ?

$
0
0

Problem Description :
Problems:
1 When I used the" LabVIEW "connected to the" myRIO 1900", I try to generate a 
"1800HZ sinewave "which amplitude is 1, to be the input of the "PWM" as the duty 
cycle changing with the "sinewave", to control the "PWM"?
2: How can I run a loop smaller than 1 millisecond, for example, 20 microsecond?
3: Can the" myRIO VI " get and use the" gloable variables "from the" FPGA VI"?

Need to close Tabtip.exe programmatically

$
0
0

Hello.

I tried the search function but without success.

 

In my application that uses a touch screen, I open Tabtip.exe using 'system exec' vi and the user enters his data.

When that is done, I start a test, but would like to programmatically close Tabtip so the display is visible.

 

I tried using TASKKILL /F /IM TabTip.exe with 'system exec' but no luck.

When I use the physical keyboard with task manager to kill the process, there is a pop up that asks for a confirmation. May be that is the reason for Tabtip not responding to the LV kill command.

 

Anybody had success doing this?

 

Thank you.

 


How to take a single value from a Floating-Point Scalar Wire?

$
0
0

Hi all,

 

I just started working with LabVIEW, and I am trying to create a zero-ing (tare) function for a pressure transducer. To do this, I would like to have a switch that takes the current value of a floating-point scalar wire (orange), stores it, and subtract it from the wire. Is there any way to do this? I am using LabVIEW 2014.

 

Thank you

Taking single value from Floating Point Scalar Wire

$
0
0

Hi all,

 

I just started working with LabVIEW, and I am trying to create a zero-ing (tare) function for a pressure transducer. To do this, I would like to have a switch that takes the current value of a floating-point scalar wire (orange), stores it, and subtract it from the wire. Is there any way to do this? I am using LabVIEW 2014.

 

Thank you

How to reset to default value every time I click abort execution?

$
0
0

Dear friends. 

 

Question: 

How to reset to default value every time I click abort execution?   

I do know how to reset to default by using invoke nodes, but I want to make this happen everything I abort the program (click the red dot bottom). Thank you.   

 

sorry about multiple posts here, there was an error. but i dont know how to delete it.   

Need help with measuring Respiratory Rate via Respiration Belt

$
0
0

Hello Friends,

 

I recently purchased a respiration belt from Studica, as well as the Ni-MYDAQ and the IX-MYDAQ in order to connect it to my PC and record data. I have not found a good way to record respiration data utilizing the default programs that comes with the Labview software suite provided with the Ni-MYDAQ. However, I found a program here on the forums called Respiration Monitor by AndyCandy, which creates a nice graph of inhalation/exhalation data and represents voltage on the Y axis. One can very clearly see peaks representing breaths. 

 

I plug my respiration belt into the IX-MYDAQ and connect it to the NI-MYDAQ, and then I'm able to see voltage changes with inhalation and exhalation via channel AIO. I can monitor these changes, and export the data to Excel if I wish.

 

I'm running into problems with the calculation of BPM - ultimately, we are only interested in BPM, and currently I have to export the data in an excel file, graph it in JMP, and then manually count breaths. The Respiration Monitor is supposed to display the BPM as calculated by the program after displaying "Calculating" for 10 seconds, but even if I record for 30+ seconds, it never changes to a number. It simply remains stuck on "Calculating." 

 

I was wondering if you had any advice for me; I've been trying to figure it out, but I'm not so skilled in Labview block diagrams. I've been able to make rudimentary changes such as changing the sample size to be able to record up to 2 minutes, but haven't been able to figure this part out (also, I'm unsure if my changes might have messed up the program somehow.) 

 

If anyone has experience with 'Respiration Monitor' and knows how to fix this issue, please help me out! Alternatively, if anyone knows of a better way to record inhalation/exhalation voltage peaks and measure Respiratory Rate (since the program is 6 years old now) please let me know that as well! I've contacted the creator of the Resp. Monitor, and he advised me to post on this forum. 

 

I've attached a pic of the block diagram. Block diagram pic.PNG

 

Thank you very much,

 

-ExperimentGuy

 

Medición de datos con Daq assistant

Viewing all 67019 articles
Browse latest View live


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