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

Reopen Labview with the same configuration

$
0
0

Hello to all.

I would like to know hoe can open my VI with the same configuration. I mean with every indicators, controls, graphs... are equal than when Labview was closed the las time.

 

Is it that possible?

I am asking this because I am developing a vision application with vision and motion toolkit. And a ROI is changed every time when I run again Labview in the same position of display.

 

Thanks a lot.


Programmatically clear table & automatic stop

$
0
0

hallo best wishes toall,Ineed help,Iwant to makeclear buttonfor atable.I want to usethe clear buttontowaveformgraphtoerase the datatableat the same time.Does anyone haveany ideas?Anddoes anyoneknow howto makethe circuitautomatic stopif value incominginputis 0 for over 5 second (fromrandomnumber).labv.png

Application builder not able to open files

$
0
0

For some reason application builder is unable to access any and every file. Anyone else experience this:Capture.PNG

 

As you can see the computer is greyed out - unavailable. What am I doing wrong?

 

Thanks

Using Matscript

$
0
0

If i want to execute a matlab code that calls other .m functions created by me how do I implement them in a matscript, and how efficient is it?

regrads

Editing contents of a labview array

$
0
0

Hi all,

sorry I am new here. I have an array I of indices and an array A of zeros, both integer valued. I am looking for a way to increment by one the elements of A that corresponds to the indices in I. In python for example it would be:

 

for i in range(0, len(A)-1):
    A[I[i]] += 1

or in C:

 for( i = 0; i < sizeof(I)/sizeof(I[0]); i++ ) {
    A[ I[i] ]++;
}

or in Matlab:

for ii = 1:numel(I)
    A(I(ii)) = A(I(ii))+1; 
end

So far I made use of a for loop and then I use a) a "In place element" structure with a Index/replace function or b) a "Replace array subset" function, and a postincrement function:Clipboard.png

The problem is, in both cases the output just keep in memory the last change, i.e. if

A = [0 1 2]
I = [0 0 1]

I would expect as an output:

[2 2 2]

while what I get is:

[0 2 2]

I hope I state the problem in a clear way. Sorry again I am new to this community. I tried to search for a solution but I guess I am missing something more fundamental here. Any help would be greatly apprciated

Best,

M

State machin and array

$
0
0

Hello

I started to develop a Labview program using a state machine. I would like to know how to fill an array in one of the states of a state machine.

My program works as follow:

- Initialization sequence

- Machine state sequence

- Close sequence

 

One of the state is the aquisition state. For now, I only added the aquisition part for 1 sensor to test the program at first.

At each loop, a cluster is updated with the aquired data (the cluster is defined as a a type definition .ctl file).  The data type updated in the cluster is a numeric.

Now, i would like to know how to process to store aquired data in an array, incremented inside the state machine . I was thinking to modify the data type inside the cluster and turn it into a numeric array but it does not work.

Do you have any suggestions?

I enclose the program main.vi and the data.ctl.

 

Thanks,

Coralie

Error 2 Possible reason(s): LabVIEW: Memory is full.

$
0
0

Hi I have a problem with LabVIEW, at trying to run the VI I got this error message:

 

Error 2 occurred at GPIB Write in esp_gpib_send_ASCII.vi->MO -Motor on.vi->InitializeStage.vi->InitializeBothStages.vi->Upconv.vi

 

Possible reason(s): LabVIEW: Memory is full

 

The VI was fully functioning yesterday and the GPIB unit seem to be working too (green light in the talk display). I have restarted the computer and checked that the memory is not full.

Thank you for your help

Switch 2533 4x64 Scanning DMM 4065 for R time out

$
0
0

Hey,

I'm trying to use 'Switch - Scanning with a DMM - Handshaking' in lv2016 but obtain time out on DMM R measurement Fetch multi point or obtain 'You cannot make an explicit connection to a configuration channel' when configurating 2533 with a column in Reserved for routing channels.

 

Is there a labview user manual (software/api use) for 2533 NI-Switch ? e.g. Regarding Load Channels, Source Channels, Reserved For Routing Channels... etc. ? thx


Inline code from all subvi's into block diagram

$
0
0

LabVIEW has a hidden .ini option to enable a right click menu inem on SubVI called "Inline SubVI" which inlines the code from the SubVI into the block diagram.

 

Is there an option or a way to do this for **all** the SubVI's in a given VI? Basically, to flatten the entire VI structure into one giant block diagram. I do not care if the resulting gigantic block diagram is unreadable.

 

Why I need this:

I have a couple of VI's developed for some common tasks which are used as SubVI's in larger projects for customers. The said VI's (let's called them A-level VI's) have anywhere from 10 to 100 or more SubVI's. I should note here that the customer is buying also the source code for the main app, but not the source code for our A-level VI's (which all have to be locked).

So, if I want to use the A-level VI's in a customer project, I have to copy every subvi to the project folder. Compiled packed libraries are a good solution, but the problem is they only work for the LabVIEW version it was built for. 

Inlining everything into 1 big giant SubVI would solve the messy folder structure, reduce the number of files and simply make it easier for us to manage the customer projects.

Waveform Graph trigger

$
0
0

I have a Labview 'read IQ' function reading a digitiser that is sending data to a Labview 'wavefrom graph' in a while loop. I can see the continuous analogue waveform but it scrolls slowly across the 'waveform graph'. On a real oscilloscope I can just set the trigger level to hold the waveform still; how can I get the Labview 'waveform graph' to hold the continuous analogue waveform still as there is no trigger level function that I know off, or should I be using another type of Labview graph/method?

Labview 11

 

Unit test framewok code coverage with Conditional Disable Structure

$
0
0

Hi everyone!

 

I have to use unit test framework becuase of code coverage check, but as far as i see, unit test framework ignors the content of any conditional disable structure and calculates false positive code coverage result. Have somebody information about that, is it a feature or a bug? Smiley Happy

 

Thank you for help.

Communication between tester and microcontroller

$
0
0

Hello All,

 

I have created a VI(Tester) and i want to communicate with a microcontroller(Source).

So, i need to send Wake up signal to Activate the Source via RS232.

Wake up signal: LOW(25ms)+HIGH(25ms) pulse.

then source responds 0x55.

Please explain me how do i send wake up signal and read the response from Device.

Tester Adress: EE

Source Adress: F0

Please find the attachemens.

4.PNG

5.PNG

 

6.PNG

Computer to FPGA communication delay

$
0
0

Hi,

 

we are searching for the fastest way of sending three values acquired by a sensor on the computer to the FPGA. The FPGA only needs the latest values.

 

I had a look at

http://zone.ni.com/reference/en-XX/help/371599K-01/lvfpgaconcepts/fpga_data_transfer_overview/

and

http://zone.ni.com/reference/en-XX/help/371599K-01/lvfpgaconcepts/pfi_data_transfer/

and decided to use front panel communication.

 

The problem is, there is still a delay of approx. 10ms between the host sending data and the FPGA receiving it. On a similar project with a Compact RIO + FPGA we used a serial module to transfer the data with a delay of less than 4ms. In the current project we want to use a myRIO 1900 target which does not offer a serial port to the FPGA.

 

Is there any option to transfer the data with less delay? What is the reason for this more or less constant value?

 

Many thanks and best regards.

IMAQ ImageToArray

$
0
0

I want to convert my color image from a camera to an array of values. I see IMAQ ImageToArray but the outputs are 2D array of U8, I16, U16 or Float. My camera is color so I expect Red, Green, Blue values. How does that fit into a 2D array of single-valued ints or floats?

 

The device is a 2k x 2k (4 Mpixel) USB3 color camera.  Frames come into LabView 2015 through the NI Vision Acquisition Wizard.  When I display the image on my front panel, it says in the panel at the bottom 2048x2048  32-bit RGB image

CAN MSG PAYLOAD: Will I need to configure for 2 bytes if I need a 9 bit msg

$
0
0

Utilizing the "CAN Loopback Test" example in the Frame Out Stream mode, I have a CAN channel that I created which represents vibration utilizing an accelerometer. I would like to obtain 9 bits of resolution so that I can represent values in the range of -128 g's to + 127.5 g's with a resolution of .5 g's. Do I need to configure the channel for 16 bits (2 bytes) even though I will only be utilizing 9 bits? I noticed that the payload (I'm assuming this is the data being tranmitted) is limited to 1 byte per frame. Does that mean I need to utilize 2 frames, the first frame containining bits 0 thru 7 and the second frame containing the 9th bit?


How to tell which commands will run in parallel?

$
0
0

Hello

 

This is a follow up on a previous discussion.  

Is there a way to know when Labview will run a set of commands together or in parallel?  Is there any kind of post-compile tool that can report this?  

 

I was trying to read from two Ocean Optics USB Spectrometers at the same time.  My originall code (illustrated below) ran one command at a time in series.

3.PNG

Once I separated each command into two different while loops (illustrated below), they ran in parallel.

4.PNG

 

To me it seems both should run in parallel.  Is there a way to check how labview will build a block diagram and remove the guesswork?

 

**I have chosen not to include a VI since it is a general question.

arduino serial print interfacing with labview

$
0
0

Hello, I am a beginner, and I am controlling four leds from four pushbuttons on hardware side with arduino and on labview in UI I made four leds, is there anyway when I turn ON a specific LED on hardware side it will also turn ON in LABVIEW and I am also serial printing 1,2,3 or 4 when turning  ON any specifc LED

 

below is the code of arduino and in attachment labview form is present:

 

byte led1 = 10;
byte led2 = 11;
byte led3 = 12;
byte led4 = 13;
byte but1 = 2;
int val1 = 0;
byte but2 = 3;
int val2 = 0;
byte but3 = 4;
int val3 = 0;
byte but4 = 5;
int val4 = 0;


void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
pinMode(led3,OUTPUT);
pinMode(led4,OUTPUT);
pinMode(but1,INPUT);
pinMode(but2,INPUT);
pinMode(but3,INPUT);
pinMode(but4,INPUT);
}

void loop() {
// put your main code here, to run repeatedly:
val1 = digitalRead(but1);
val2 = digitalRead(but2);
val3 = digitalRead(but3);
val4 = digitalRead(but4);

if(val1 == LOW)
{
digitalWrite(led1,HIGH);
Serial.print(1);
}

else
digitalWrite(led1,LOW);

if(val2 == LOW)
{
digitalWrite(led2,HIGH);
Serial.print(2);
}
else
digitalWrite(led2,LOW);

if(val3 == LOW)
{
digitalWrite(led3,HIGH);
Serial.print(3);

}
else
digitalWrite(led3,LOW);

if(val4 == LOW)
{
digitalWrite(led4,HIGH);
Serial.print(4);
}
else
digitalWrite(led4,LOW);

 

 }

Reset Ethernet on Optronis Camera

$
0
0

I am working with an Optronis high speed camera for which I have been supplied a set of LabVIEW VI talking to a common dll.

 

There is a VI called CAM_Reset.

 

If the program crashes, which it does a lot, when I attempt a reset, I get a response : 3 

 

3 means camera busy. 

 

Power cycling the camera does nothing.  I must close down and repopen LabVIEW.  At no point do I set the IP address, the IP address is hardcoded and the dll knows where to communicate once the camera has been set up, it possible that there is an initial search when first loaded if the IP has been changed on the cameras.

 

So basically, the camera is not initialised using a visible VISA control and it is done underneath the hood.  It appears LaBVIEW retains a dead reference and will not allow communication with the camera.  Is there anyway of listing this reference and killing it?

 

Thanks,

Seán

Why full bridge resistance needed if sensitivity is known for load / pressure cell?

$
0
0

Using SignalExpress 2015 and configuring a "Force (Bridge)" or "Pressure (Bridge)" Measurement Type for a PXIe-4331, the inputs include both Bridge Resistance and a button for Configuration Scale. 

 

Capture.PNG

 

In the Configuration Scale, I can specify end points for the Two-Point Linear option based on hardware documentation of mV/V sensitivity and the known capacity of the sensor. 

 

Capture2.PNG

 

If the sensor is a full bridge configuration, why is the bridge resistance even requested?  Won't the differential of AI+ and AI- just be scaled by the sensitivity specified in the Configuration Scale?  Is the bridge resistance input just ignored by SignalExpress for a full bridge?

 

Thanks for any insights!

What to do with the error 7 and error8 ?

$
0
0

My labview program wes reinstolled from, may be, version 2006 to version 2013.

However, there are some problem with starting this program.

When i clicked the start botton, error massages emerged with error 8 and error 7.

i attached labview program and error massages.

 

Please help me to use this program.

 

Thanks you.

Viewing all 66935 articles
Browse latest View live


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