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

limit string control to number of bytes

$
0
0

Hi,

 

Is there a way to set the limit on the length of string control in number of bytes? I have a string control whose length is always going to be 3 bytes and I don't want the user to accidentally enter more bytes.

What I have done right now is have a value change event on the string and display only the 1st 3 bytes whenever the value change event occurs but I want to know if there is any direct way to set the limit on the number of bytes on the string control.

 

Thanks,

Ritesh


Threshold Triggering Using DAQ Assistant

$
0
0

Hi to all

 

I am using pressure transducers to acquire pressure signal using the DAQ assistant. Is there any way that I can trigger the acquisition of signals after the pressure is more than a certain value?

 

Thanks in advance

Counting reps

$
0
0

Hi

 

I'm still very green in LabVIEW and are working on a project where i could use a hint or two.

I am making a VI with a slide that controls 2 points on a xy graph. The slide can go from 0-100 and i want a counting system which can detect and count one set. A set is defined as when the slide goes from below 25 to above 60 and back below 20 again. Futhermore i want it to store the max and minimum value of each set.

 

Fx

If the slide goes from 0 to 81 and back to 5 it should count 1 set. If the slide then goes from 5 to 71 and then back to 2, another set should be added and the indicator that counts sets should now say two sets done. If the slide doesnt get above 60 in a set, it shouldnt be counted.

 

I've attached a VI which have a slide and a graph that shows the two points plotted, to give a better understanding of my problem.

 

I hope someone got a hint for a solution to this, thanks!

 

Question about dialog pop-up windows

$
0
0

I have a program that runs two test units independently with one LV program.  It contains two separate while loops where each one will run a unit through mutliple tests and watch for any faults.  When a fault does occur, a one-button dialog window will pop up to alert the operator.

 

This weekend, a test stand had two units running and one of the units had a fault that occured during the night, so no one was present to reset the fault for a long time.  While that fault dialog window was up, though, the other unit seemed to "freeze" and did not cycle any further in its testing until someone came in a day or so later to clear the dialog window.

 

Does a dialog window cause everything running in LV to "stop" until the window is cleared?

compiling dll for visual basic, which datatypes are ok?

$
0
0

I have a VI routine that performs calculations on greyscale image inputs (represented as U16 2D arrays) and spits extracted parameters out.  I need to send this code to a contract manufacturer, but protect our code from scrutiny. They use Visual Basic as their development environment. Is there a way I can compile the LabVIEW VI into a DLL that they can use and link to in VB? I'm not sure how DLL's handle data structures like clusters. My VI inputs and outputs are listed below, can anyone tell me if I have to make changes so that the VI becomes amendable to being compiled into a DLL?

 

Inputs:

2D array of U16

2D array of U16

Double

Cluster of

     9 Doubles

     U32

Cluster of

     1D array of doubles

     1D array of doubles

 

Outputs:

1D array of doubles

Cluster of

     1D array of doubles

     1D array of doubles

Cluster of

     1D array of doubles

     1D array of doubles

     1D array of doubles

2D array of I32

 

 

Thanks for your help!

 

Print report with Adobe Distiller X

$
0
0

Anyone used Adobe Distiller X ?

 

Old LabVIEW application works fine on Windows 7 32 bit not working right on Windows 7 64 bit:

It ignores the filename set in the registry, pops up the save as dialog window.

 

Is this the 64 bit issue? i.e. 64 bit spooler not compatible with 32 bit LabVIEW application?

 

 

Can't understand why ''Terminal data type of Audio IN fpga node is 16 bit signed integer''??

$
0
0

Hello there,

I am working with myRIO 1900 for my ANC project.  

 

The Audio IN of the fpga node is giving its terminal data type as 16 bit signed integer. So, eventually the output from the fpga nodes is fluctuating between two values -1 and 1. But I want the real values of audio data, I could not understand how to approach this problem.

 

Audio In on the RT side is giving terminal data type as real values, but I could not understand why the terminal data type of fpga Audio In is 16 bit integer. ??

 

Please help me solve this problem.

 

Thank you.

Correct Design Pattern for my 3 Instrument Application

$
0
0

I am trying to figure out the best design pattern for a project I am working on. I am using a workstation to control three instruments and a swith matrix to connect to multiple outputs so that simple measurements can be taken across those outputs.

 

The user will select a few initial settings but then will click a "Start" setting off a full sequence of measurements where the user will have no interaction during the measurements.

 

I was orignailly working with an Even Driven Producer Consumer (With a state machine in the consumer loop) design pattern , but am rethinking what I need to be doing since the process will be something like..

 

  1. Gather tesing initial conditions.
  2. User presses start.
  3. Switch to output1 → Measurements with insturment 1 → Measure with insturment 2 → Measure with insturment 3
  4. Switch to output2 → Same as above ↑
  5. Continue switching until all outputs have been covered.
  6. Log Data

My main problem is that I need something to take care of the timing, making sure that the system is waiting between swiching and connecting to insturments and then repeating the sequence if the user selects to have the test run continuously.

 

Any help is much appreciated!!!

 

Thanks,

 

Kellen


Does any one have Corelis Buspro-s labview examples

$
0
0

i am working on Corelis Buspro-s i have drivers but i am unable to communicate using labview drivers. Using Gui i am able to communicate . Please send me some Example related to Corelis BusPro-s labview Examples for SPI Write or SPI Read.

Debug problem with native VI

$
0
0

Hi

I have problem with native VI used to initialize the instruments: Fgen, Scope, DMM, DCPower sypply with options. 

As it is attached, the program goes into a loop in this functions and I only can abort it resetting LabVIEW.

I am using LabVIEW 2015 and the instruments are included in a PXI chassis. 

How can I debug the error to know where is the problem?

Thanks!

Simulate a delayed signal

$
0
0

Hello everyone.

I have this proble: I'm making a simulation of signal propagation between a Tx and a Rx, but I need to simulate the propagation delay between the two points. The signal that i want to delay is QPSK modulated with the modulation toolkit. The point is to show the original signal, starting in T0=0s, and the delayed one (same signal but with T0= any delay value in seconds). 

Thanks,

David

Remote Desktop causing performance issues with GUI indicators

$
0
0

Recently, I've stumbled across some issues with remote desktop (RDP) and front panel GUI indicators no longer updating properly when you remotely login to a test station. 

 

I've experienced random failures that at the time I was unable to pinpoint the root cause of, but it appears when I remote into a desktop, it is highly likely that I can affect the performance of the code running on that machine.

 

Has anyone else ever experienced this type of behavior using RDP, and if so what did you do to solve it?

exisiting TCP data

$
0
0

 

I am putting together a VI to read TCP data that has a 12 byte TCP wrap (the first 12 bytes of every TCP packet of data) but I am having problems when TCP data does not exist.

 

 

readTCP.jpg

 

Is there a way to determine if TCP data exists for a specific device (IP address) before I attempt to read the

TCP wrap that is used for each TCP packet?

 

thanks

 

 

 

 

Error when create LabVIEW FPGA Control on CompactRIO

$
0
0

I have error when trying to create a new project from template LabVIEW FPGA Control on CompactRIO. I tried with LabVIEW 2014 then update to 2014 SP1. This error still happens.

Please help me with this.

 

Regards,

Thang Nguyen

action engine being accessed in an unknown part of my code

$
0
0

I've been at this LV thing for quite some time and I don't think I've ever been this stumped over something that could very well be a really stupid question on my part. But here goes ...

 

I have an action engine AE that I use to store and set setpoints and read status of a motor controller.

 

My bug: when my code is running in an idle state the action "write motor controller" should not be written to but is getting written to in some part of the code. I cannot seem to track down when and where this is being written.

 

Is there a way I can find out exactly when and in what vi a specific action in my AE is being written? I am using a heavily modified producer/consumer from the template. I have listed all the callers of this vi and everything is where it should be. I put a breakpoint on the "write motor controller" portion of the code and it gets constantly accessed while my code is idling but it shouldn't be since I'm only reading the data in the AE when I'm idling.

 

I'm really stumped.


standalone application not showing detailed help

$
0
0

We have a "standard test shell" that looks up part numbers and calls driver vi's based on the part name (Part 1234 -> 1234.vi). The "standard test shell" calls the driver vi by reference. Prior to running it, the help path property for that vi is assigned. This path is relative to the driver location (<...>\1234\1234.vi has help files in <...>\1234\Documents\1234.htm). When run in the development environment, the context menu shows the Detailed Help link and when that is clicked, the appropriate help file is brought up in the browser.

 

This structure is stored in a project file. The project is built into a standalone application, with all of the driver folders included as source files. When the standalone application is installed on a target machine, the installed application finds the drivers, correctly determines the help file path, and the help files are confirmed present at that path. But the Detailed Help link does not show up in the context menu. This behavior indicates that the <...>\1234\Documents\1234.htm file cannot be found, but we have added log messages that confirm that the file exists. What else can be keeping the standalone applicaton from showing the Detailed Help link?

 

 

Accelerometer gives wrong signals

$
0
0

Dear all, 

 

I have a problem with the signal I got from an accelerometer. I am doing a drop test and I have mounted an accelerometer on the bullet dropped in free fall. The objective of the test is to measure the impact force.

 

The accelerometer is a single axis accelerometer with capacity of +/- 10000 g. The accelerometer is connected with an amplifier and then to the NI6361. The module is then connected with a PXI 1073. 

 

The bullet (steel) weight of 10.6 kg was dropped from 100 mm in a concrete base and the response I got was 3500g. I think this is unreasonable as the theoretical calculations in conjunction with the image analysis using a high speed camera provided me with the acceleration of 40g.

 

According to the supplier, each 1 Volt corresponds to 1000 g. Any help will be much appreciated. 

 

Thank you, 

Stath

frequenzmessung

$
0
0

Hallo liebe Labview-Entwickler,

ich benutze gerade Labview für ein Projekt zur Bestimmung der Leistung eines kleinen Motores. Dazu muss die Drehzahl und das Drehmoment des Motors (Am EIn- und Ausgang) bestimmt werden. Die Bestimmung des Drehmoments war kein Problem, da ich aus einem analogen Eingangssignal das Drehmoment ableiten konnte. mein Problem liegt jetzt bei der Frequenzbestimmung mittels eines digitalen Signals. zur Verfügung habe ich das Modul NI 9104 und den Chassis NI DAQ 9174. meines Wissens nach gibt es zwei Methoden zur Bestimmung der Frequenz eines digitalen Signals bei Labview mittels DAQmx. durch Flankenzählung und auch durch Frequenzzählung. die direkte Anwendung der Frequenzzählung fiel mir einfacher, da daraus die Drehzahl direkt abgeleitet werden kann. Diese Methode habe ich  mit einem impliziten Timing probiert, alles lief wunderbar und die Messergebnisse waren zimlich genauer (im Bezug zu was der umrichter zeigt). Da die Drehzahl- und die Drehmomenterfassng synchronisiert abgetastet sein sollte habe ich statt implizit ein Sample clock benutzt. bisher alles in Ordnung. Ich habe auf dem SubVI Kanal erstellen der Frequenzbereich des Eingangssignals zu 2-100 Hz gelassen. wenn ich 5 Messwerte mit einer Rate von 1Hz bei dem Sample Clock einstelle, bekomme ich vernünftige Messwerte. Sobald ich der Frequenzbereich (z.B zwischen 2 und 350 Hz) und die Abtastrate (zu 1000 Hz) ändere kommt eine Fehlermeldung (siehe Anhang), egal wie hoch ich den Frequenzbereich einstelle (woher kann ich den Frequenzbereich meines Signals bekommen?). 

Ich habe das auch mittels Flankenzählung probiert, wobei die Flanken gezählt und durch die Periode geteilt werden, alles läuft. aber hier werden die Messwerte weniger genauer (Manchmal mit 5 Hz unterschied oder mehr).

Hierbei wird dem Umrichter am Antriebstrang des Motors mit 600 U/min betrieben.

Kann mir bitte jemand hier sagen, was ich bei dieser Teilaufgabe falsch mache oder gemacht habe?

Danke im Voraus für eure Antworten.

 

LG

 

Lab_fänger

 

[LabVIEW Bug Report] Parabolic Cylinder Function

$
0
0

I have reported on the poor implementation of the Kummer function in the past (the situation being far from resolved, despite claims to the contrary).

I am sorry to have to report on similar problems with another special function.

 

Introducing the parabolic cylinder function D_nu(x):

 

Screen Shot 2015-12-15 at 11.11.42.png

 

It is defined, for instance, here: http://mathworld.wolfram.com/ParabolicCylinderFunction.html

It can be conveniently calculated online using the Wolfram Alpha engine. Just type ParabolicCylinderD[nu,x] where nu is the function's parameter and x its argument.

 

So let's start with the usual precision game (LabvIEW 2015f2 64 bit first, then Wolfram Alpha):

 

  • D[0,1.5] = 0.5697828240567580600000

                   = 0.569782824730923009766629689829122815884638474327995977291008...

 

difference ~O(1E-9)

 

  • D[1.3333,1.5] = 0.8895635352834155800000

                             = 0.889563535907529859621528428740936371747863209252972283125817...

 

difference ~O(1E-9)

 

This is prefectly acceptable precision (considering that LV uses double precision, we might expect better, but I am not complaining at this stage).

 

  • D[1.3333,10] = -0.111362756256787130000000

                           = 2.985207642444327055287247415431910447206487785233086081... × 10^-10

 

right... I think so too.

 

  • D[1.3333,100] = NaN

                              = 8.51894064312482769698267175786164468232938918634102127... × 10^-1084

 

The dreaded NaN again!

 

In general, the limit of D_nu[x] for large x should be zero and therefore NaN is not an answer (but it is the systematic answer of NI's implementation). Probably, as for the Kummer function, the algorithm used to estimate the function is suboptimal.

 

As such, I would qualify the function as useless and would recommend (again) NI to put some serious effort in vetting their functions against trustworthy references.

 

Use of memory block in different clock domains (or some advice to use another approach)

$
0
0

Hi. It is my first post at the NI forums. I did some research about the following problem but I could not find a way to solve it.

 

I have a high speed scanning system, triggered to acquire shots of 200 k samples at a rate of 250 MHz. When the acquisition is done, a scanning motor moves the material to the next spot and triggers a new acquisition of 200 k samples. It works continuously: when the last spot is reached, the motors move back to the fist position and start over. This system should produce real-time tomographic images. After the acquisition, some data processing is necessary: filtering, normalization, FFT, down sampling and so on. Before start acquiring a new image, the system can have a little break to finish the processing and empty the queue, avoiding overflow.

 

At this time, the FPGA code simply acquire the data and send it to the Host VI through a ‘Target to Host-DMA’ FIFO. However, due to the low transfer rate to the host VI, the queue rapidly overflow and it is not enough to acquire 10% of the data necessary for one image. I created another loop that ‘hold’ the acquisition and re-enable it when the FIFO has reasonable space available. All the processing data routines are done at the host VI. 

 

However, I would like to implement the acquisition and all the data processing functions at the FPGA board. For the data acquisition, single-cycle timed loop (SCTL) is used – 250 MHz. Since only few functions work inside SCTL, another clock domain was created with a frequency of 80 MHz – higher loop frequencies generate compilation errors due to time violations.

The problem arises when I want to send data from one clock domain to another. A regular FIFO has size limitations and it still overflows when both loops are working. So, I need a bigger buffer to stack the data before it is processed. Block memory is more feasible for this purpose, but the latency time prevent its use inside a SCTL.

 

So, my question is how to have high speed data acquisition and data processing inside the FPGA. My idea is to use a producer-consumer framework. While the acquisition loop adds elements to the queue (ex. memory block), the consumer loop drops and process it according to its capability. The queue works as a buffer and should be big enough to avoid overflow.

 

My latest code use a SCTL to acquire and send data to a FIFO (please see the chart attached). The timed loop reads data from FIFO and sends it to the block memory (pre-processing). A third loop reads the pre-process memory, execute some functions and adds the processed data to a post-processing block memory. The fourth loop uses a second FIFO (target to host – DMA) to send the processed data to the Host VI. Instead of the original 200k points, only ~5k are send to the host. However, it still fails due to the use of read/write operations of the memory at different clock domains.

 

Is there any other way to implement this code. Or how could I configure the hardware to allow this use.

 

My hardware is:

Chassi PXIe-1082

Acquisition board: PXIe-7965R with an IO module NI 5761R

It also have a PXI-7851R which is used to drive the motors and for another triggering purporses.

 

I appreciate any help. Thanks.

 

 

 

Viewing all 69605 articles
Browse latest View live


Latest Images

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