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

Producer Consumer

$
0
0

I have a State Machine with a subvi in it.  The code runs in the state machine then encounters the subvi.  The subvi pops up a display to the user a clock and a pressure measurement.  The clock counts down 2 mins while monitoring the pressure (loop).  A the end of the subvi loop the final pressure value is passed back to the main vi from which the subvi was called from.  This all works fine for me.  If there is a catastrophic leak and the pressure drops below a large amount..say 500 psi..there is no sense in continuing w the count down.  Can I use a producer/consumer routine such that if I put an abort button on the popup and the user hits it ( the producer) the subvi will end and return to the main vi??  Does this sound like its feasible and what producer/consumer is used for??  Where is Producer/Consumer in Labview 2014 ?  I can't find it in the examples or on any pallets.

 

Thxs


Error -1074397038 occurred at IMAQ Grab Setup.vi

$
0
0

We are using the SU320CSX IR camera; and have used it previously (within the last 9 months) in tandem with labview. However as of August 2019; we are unable to operate the vi on labview 2017; as it gives an error "Error -1074397038 occurred at IMAQ Grab Setup.vi".

 

We checked the sui image analysis software and camera seems to be working fine and is definitely being detected by the PC; does anyone have a solution to this?

LabVIEW NXG Web module Customize Tree control column widths

$
0
0

Hello I’m trying to build a Web application using LabVIEW NXG and the Web Module.

 

To customize controls and indicators, there are some examples with custom style and CSS file.

 

In my WebVI, I use “Tree control” to display information, and I need to fix the columns size.

 

Unfortunately, in the LabVIEW NXG 3.1 release, there is no property node to define the size of the columns. By default:

column-widths='["auto", "100", "100"]'

 

In the LabVIEW NXG IDE, I define a “HTML class attribute” to the “Tree control” (my-Event-LD), add:

<link rel="stylesheet" href="css/style.css"> 

in the HTML code and I define a CSS file to customize the appearance of control.

 

I try current property, but it doesn’t work:

code.png

Someone can help me?

thanks a lot

A+Luc

 

Events: Intensity map autoscale

$
0
0

Hi,

 

I am using 2d intensity map to display a large, 2d array (aka an image).

 

I have created an event to automatically re-scale the x- and y- coordinates when zooming in and out.  There is an "Autoscale Range Change" event that sounds like what I need.  So far so good.

 

Zoom in and and zoom out buttons from the palette work as expected.

Zoom-to-fit works.

However, dragging a rectangle DOES NOT work.

 

I found a work around by adding an "mouse up" event, but I wonder if that messes up something else; I use placed cursors there as well and couple other things.  So far, nothing that breaks it ... fingers crossed.

 

Is it just me doing something silly, or is that a bug in LabView?

 

Thank you.

Radek

DAQmx read.vi; Analog 1D Wfm NChannal N Sample

$
0
0

Hi 

 

I am using the Analog 1D Wfm NChannal N Sample mode of the DAQmx Read.vi to collect voltage data. There are 4 physical channels used so I am assuming that there should be 4 wfms as results. However, I wonder why there are 8 sets of data displayed in the waveform chart. 

 

Take care

Huang

Using Refrences with Express VI's.

$
0
0

Hello everyone,

 

I am currently working on merging two functional VI's together.  They both work as intended, but they both need to run inside of independent while loops.  The issue I am running into is writing the data from both loops into the same spreadsheet.  I have tried using refrences to these values and merging the refrenced variables with the signals in the other while loop, but the refrences simply aren't the right data type.  I have attached a small chunk of my block diagram below to show my issue.  

Thank you,

Jackson

Read parameter files

$
0
0

I am looking for the correct way to read in parameter files and then use within program to set say test limits and such instead of hard coding. I have done this in VB and stored the values in constants or variables.  Looking for the best practice way in LabVIEW.

 

Any help appreciated  

Need some pointer on setting up online lab

$
0
0

Hello Everyone,

 

I’m sorry if this is not the right place to ask. I’m currently trying to help a teacher set up a GUI for online learning lab. Let say we have our simple circuit set up on the NI Elvis III, and a user want to change a voltage from 5V to 12V to see how the circuit change. Do we have an existing API or a function call for this to call it from outside of LabView or the Elvis? Or do I need to write a program for it?

 

I also know that NI have Multisim for circuit simulation and can have it connect to the Elvis.

 

I’m still very inexperience and don’t know much about LabView and the NI Elvis III. If any of you can give me some pointers, help, or learning resources relate to this, I would be very appreciated.

 

Thank You for reading.


Boolean Array

$
0
0

Hi, im new in this thing of labview, so i dont know a lot of things about this software. Im trying to change a column of a boolean array to the other side of the array. If someone could help me, i´ll be very grateful

Error 56 ?

Fluke fl9500B IVI Instrument Driver downloading problem

$
0
0

I can't download the IVI Instrument Driver. Alghough upgrade the navigator, but still fail.

 

IVI Instrument Driver download.pngwin10 system, always fail to download.I

 

Cannot install IVI Compliance Package

$
0
0

I can't install IVI Compliance Package successfully.

file name: ni-icp_19.0_online

Operation system:Win10

Hardware: No

Labview professional version: 10

微信图片_20191102172011.png微信图片_20191102172025.png

The first picture shows 'Upgrading Package Manager Development Support'.  But after a while, the second picture shows 'turn off the sever connection ( I guess),and so on......'

Packed BCD sent to instrument

$
0
0

am currently trying to communicate with an old instrument that uses packed BCD numbers only (it's a Varian FR41 Controller Gaussmeter if anyone is familiar). I am using Labview to replicate some old C code that output the BCD code. Below is the C script. What it is doing is some simple arithmetic to generate integers that are exported to the instrument through the IEEE port using %c.

(thanks to GerdW for helping turn this into a working VI https://forums.ni.com/t5/LabVIEW/IEEE-write-converted-from-C/td-p/3930058)

#include "ieeeio.h"
#include <math.h>
#include <stdio.h>


main()

{
  long  temp;
  int   z1,z2,z3,z4,b1,b2,b3;
  float b;
  double gauss,hv=5000.,magconst=.069,Mass=87.;

  if (ieeeinit()==-1)
  {
    printf("Cannot initialize IEEE system.\n");
    exit(1);
  }
  gauss=sqrt(Mass*hv/magconst);
  temp=10*gauss;
  b=temp/10.;
  z1=b/1000;
  z2=b/100;
  z3=b/10;
  z4=b;
  printf("\n\r %f %f %d %d %d %d",gauss,b,z1,z2,z3,z4);
  b1=z2+z1*6;
  b2=z4+6*z3-160*z2;
  b3=(b-z4)*160+14;
  printf("\n\r %d %d %d %d",7,b1,b2,b3);
  ieeewt("output 08;");
  ieeeprtf("%c%c%c%c\n",7,b1,b2,b3);
}

I have generated a modified .VI that generates the same numbers b1,b2,b3 and puts them into a string of packed BCD numbers. Using the input variables HV,magconst,mass above, the output should be 2510.8 gauss. and b1,b2,b3 are 142,37,16 respectively.

Now on to what the Varian Gaussmeter wants. This is the text that describes how the instrument receives information (not all of this is useful, but I copy it for the sake of completeness).  I've also attached an image of the pseudo manual that this text comes from. 

 

Data are transmitted to the FR-41 as a sequence of three 8 bit bytes. Each byte is divided into two half bytes, hi and lo, which may contain BCD numbers only. When auxiliary output port is used a fourth byte (any binary number) is added to the beginning of the sequence. The last character sent contains the least significant digit (LSD) of the new Gauss setting in the hi byte location and a load control NON BCD character, (bin 14) in the lo byte which is interpreted to load all registers with the new data. The one bit of the lo byte controls the 10 kGauss overrange when used. no change of setting occurs until the control word is received

So, if I'm understanding this correctly in the C code above, the first byte added (aux output port thing) seems to be 7, which should be 0000 0111 in BCD. The following bytes, to write 2510.8, should be 0010 0101 0001 0000 1000 followed by 1110 (for the bin 14 control word).

Here's what I have done. Using the attached .VI, I can reproduce the 32 bit BCD string that I expect it should be. I'm sending this to the GPIB Send Message VI in Labview (I've also tried using VISA Write, but it does the exact same thing across all tests as far as I can see). However, the instrument doesn't register anything happening.

 

The interesting thing is that when I send the instrument the information as a %f string, of floating points, so, 7.0000142.00037.00016.000, the instrument registers something happening and the tens and hundreds places change. So, if I send 42 as a floating point, the instrument will go to X4X2.X gauss setting. If I put 142 it will do the same thing. If I put 17 it will go to X1X7.X setting. If I send it 17 then 25 it will only take the first one.

 

My thought is that something in the GPIB Send or VISA Write is taking my string of BCD numbers and sending them out as something else, but I can't figure out what I could be doing wrong. Any help or tests would be much appreciated; I've been struggling with this for weeks now to no avail.

Acquire one sample per Trigger

$
0
0

Hi All,

 

I wanted to know whether we can Trigger  DAQ to acquire one sample per each trigger input . Currently I'm using NI-DAQ 6251 board and I have configured PFI0 channel to trigger at the falling edge of the trigger input with the function " DAQmxCfgDigEdgeStartTrig " . Then I want to acquire a single sample to the Analog input channel AI0. for that I had called " DAQmxReadAnalogScalarF64 " . But when I ran the program It gives me an error code of " DAQmxErrorTrigWhenOnDemandSampTiming   ( -200262)" . I do not understand  how to solve this error and I couldn't find any documentation which has acquire a single channel ,single data point with trigger input.

 

So, is it possible to acquire a single data point per each trigger input ?

 

* I am using Matlab software to communicate with DAQ card. here is the code I was using.

 

h = 10;
DAQRate = 1e6 ; %S/s
IntgSample = double(0);
IntegArray = zeros(1,h);

AIvoltage = DAQmxCreateTask('');
DAQmxCreateAIVoltageChan(AIvoltage,'Dev1/ai0','AIin','DAQmx_Val_Cfg_Default',0,10,'DAQmx_Val_Volts','');


[StatusTrig, AIvoltage,~] = DAQmxCfgDigEdgeStartTrig(AIvoltage,'/Dev1/PFI0','DAQmx_Val_Falling');

 

pb_start;  % ignore this line. this is my trigger input


[StatusStart, AIvoltage] = DAQmxStartTask(AIvoltage);


for i = 1:h
[StatusReadAnalogScal,AIvoltage,IntgSample,~] = DAQmxReadAnalogScalarF64(AIvoltage,timeout,IntgSample);
IntegArray(i) = IntgSample ;

end


[StatusStop, AIvoltage] = DAQmxStopTask(AIvoltage);

DAQmxClearTask(AIvoltage);

 

 

thanks in advance.

 

How to get a dial to click to numbers

$
0
0

I want a dial to only be able to move to the numbers on the dial, not be able to be dragged to spaces in between the numbers. Like how some dials click to each number there's no in between selection possible


Code example for NI PXIe 7861/ NI PXIe 7862 module

$
0
0

I'm just wondering, why LabVIEW 2018 is missing code examples for modules NI PXIe 7861/ NI PXIe 7862. Are those some new modules, and that's why there is no code examples for it yet? Or those exist, but are included into latest LabVIEW version 2019 (unfortunately I don't have it installed, thus difficult to find it out)...

 

Thanks a lot in advance for this information!

K-Mean Clustering

$
0
0

Hello!

 

I have implemented K-Mean clustering algorithm and I want to bifurcate the data into 5 data groups.I have attached my required.png file and my code but the code doesn,t generate the desired output every time.I am initialization my centroids withing the span of data generated and it is all random. Terminating my loop when there is no change between the previous and currently calculated centers of clusters.

LabVIEW NXG installation error - ni-ssp-notifier

savitzky golay filter function principle

$
0
0

Hi all

   I have a project of savitzky golay filter converter data,I don't understand that what is work for,Please help me explained the detail,such as why set polynominal order is 1 or 2 and side points is 5 and data converter calculated principle,thanks!!

 

 

20191104103107.png

Trying to meet the best practices

$
0
0

I'm not completely sure if it is a topic for "Certification" section but I think it can fit very well here.

 

Trying to be short: I will take the CLD test soon and I have some questions about the best practices and I would be really grateful if you guys can help me a bit here.

 

1. Property Node Error wire?

Should I wire the error input and output of the Property Nodes? I think it looks messy when I do so.


2. Bundle Control and Indicator References outside of the Main Loop or in a case inside of the Main Loop?

 

3. Event Case
If I have a Switch until Release Button I use a Selector to select the the next State depending on the New Value. Is that correct or should I rather do something else?

 

4. Should I really create and use SubVI's?
I think I don't really need to make them most of the time.
Are there any signs to realize "Oh, this must be in a VI"?

 

5. Update Indicators

I use a Case callled "Update Indicators" in order to update the indicators like  the Status Message and other indicators. Is it ok? Or should I use a FGV to Update Indicators? I Think a FGV is easier but I don't know if it is recommended.

 

Thank you.

Regards.

Viewing all 69758 articles
Browse latest View live


Latest Images

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