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

LabVIEW Community Edition (CE) activation problems - solved!

$
0
0

For everyone who has issues activating their LabVIEW CE installations: It may be due to a glitch they had with their server.  The instructions on how to remedy this are here.

 

I hope this helps!


ライブラリ関数呼び出しノードで0x449エラー

How to send signal to daq with different time length

$
0
0

Dear LabVIEW community,

 

I have a very simple program to send signal to DAQ. I have a case structure to send different types of signal to the daq. If the case is '0' it sends out a DC signal. If the case is '1' or '2' it sends out a square wave with different amplitude. I am able to do all of the above as shown in my code but I would like to send the square waves in case "1" and "2" for 5 seconds. In my code, when I trigger my condition to switch to case "1" or "2", it will send a square wave immediately for under a second and switch back to the '0' case. I want to send the square waves in case "1" and "2" for 5 seconds. However, I just couldn't figure out how to accomplish this. Will appreciate for any suggestions!

get max out of 5 matrix using for loop

$
0
0

I have matrix 4x5

 

WANT TO DO:

for 5 iterations: I get 1st index as 4x1 and then I reshaped it to 2x2

 

I have a matrix of 2x2x5  [5 images of 2x2]

 

I know how to maximize two matrices and get one using min-max control

 

 

 

3.png

  

but I want  to do this

Afinal=[0] 

for i = 0:100

    Afinal=minmax of (Ai,Afinal)

 

XY graph in event structure

$
0
0

•We are developing a program  to input a data file, and calculate the Total Area with Event Structure.

•The area of the graph  is bounded by the red line cursors in the X Y graph.

•The red cursor lines depends on two external parameters, the dx (FWHM) and the peak difference.

•When the program is run initially, we firstly load the data into the program and the program can calculate the area once.

•Problem: we further vary the value of dx (FWHM) or peak difference in the front panel,  but the calculated areas do not vary accordingly. How can we revise the program? (So, when we vary the value of dx or peak difference, the program can calculate the areas automatically.)

for loop to index array

$
0
0

I have a 4x5 matrix 

I want to take out each col (4x1) and convert that into (2x2) now I want to get the max elements array till now  

 

confused in RED BOX

 

gptshubham595_1-1610617823696.png

 

 

IDE not responding, rewire a wire takes 30+ secs to take effect?

$
0
0

When I have to change configure Discrete Delay or even rewire a wire, the IDE takes about 30 secs to responding.

jiangliang_0-1610617074341.png

 

Also, if I open Windows resource manager I can see it shows LabVIEW is waiting for network IO? I can't get the point why LabVIEW is waiting for network IO? or maybe this is not relevant?

jiangliang_1-1610617336949.png

 

The VI is kind of complex, it is a custom FIR filter, and I prefer to have this function in one VI.

 

I also tried to close VI and reopen it, restart LabVIEW, restart PC, none of them really helps, maybe the first 3 or 5 wires respond better (also takes 5+ secs), soon the overall performance drops to unbearable.

 

sinusoidal signal

$
0
0

hello, I tried to make a sinusoidal signal with an interruption period as in the following picture but I only managed a simple sinusoidal signal 

img FPGA.png

it would help me a few ideas how to make the signal look like above, thanks


Repositioning elements in array to a new centre

$
0
0

Hello,

 

I am having trouble figuring out how to find a solution to my problem here. I have found coordinates/indexes of the max value of my array and now I want to shift it to the centre/make it the new centre of the array (not sure how to do this for an even-sized array). After that, I want to create a circle around the max/centre value and make everything outside of the circle 0. Can anyone please help me with this problem or introduce to me some tools/VIs that may help me as I am still new to LV :). 

 

My current conceptual idea is to form the circle around the max value then retrieve that as a subarray and insert it into an initialised 0 array of the same size. But I am still lost on how to do this.

bche536_1-1610631793140.png

 

 

Ocean Optics - dll error

$
0
0

Hello,
I am trying to use Labview (version 8.6, 2020, 64 bit, running on Windows 10) to interface with my Ocean Insight FLAME spectrometer and I am having some trouble.

 

I would like to be able to set the integration time, scans to average, boxcar width, and light and dark references, then continuously acquire data and save it to a file.

First I tried just downloading the drivers and following the sample programs but I could not figure out how to set the scans to average.

 

Next I tried installing OmniDriver with SPAM (Windows 64 bit version) and following this tutorial
https://www.youtube.com/watch?v=tT5C43D3rRA&ab_channel=OceanInsight

But I keep getting a dll error:

Error 1097 occurred at call library function node in Wrapper_Create.vi -> Omni_test

 

Does anyone know how to fix this error, or even better, set the scans to average without using Omnidriver at all?

Joe

Ni 9260

$
0
0

Hi

is it possible to connect ni 9260 module to sbrio 9608?

 Thanks 

moran

How to detect the instants of level changes in a waveform using Labview?

$
0
0
 

Can anyone guide me on how to detect the time instants(alpha1,alpha2,alpha3) from below waveform data using labview ?

I am able to detect level change instants in pulse train by setting a threshold using "find transitions" and "threshold detector" VIs but can't do it in stepped waveform like below because I can't choose a single threshold to detect all level changes.

IET-PEL.2019.0255.06.gif

Raw hexadecimal string to real number with 2's complement

$
0
0

Hi!

 

I have a device giving me its orientation (X Y Z angles) in a hexadecimal string of 20 bytes as followed:

[Start of message] 2bytes

[X DATA (3bytes) | X Status (1bytes)]

[Y DATA (3bytes) | Y Status (1bytes)]

[Z DATA (3bytes) | Z Status (1bytes)]

[other data] 6 Bytes

 

All attached without spaces, that looks like : AAAAFF67BE02AFE3BD027F60BA02AABBCCDD

I'd like to convert for instance the X data (FF 67 BE 02, 02 being the status - ok/notok) into a real angle value : FF67BE into -38 978° (if conversion LSB/number is 1.)

 

So far I have done what you see below as an example, but I am not sure that I am not overdoing things a bit.

Especially, I am not sure when I should do the conversion to I32...

 

If I could have your honest opinion on wether what I'm doing is ok or not, that'd be great, thanks 🙂

 

RawString_to_angle.png

 

Vinny.

Acquiring data using RS232&MODBUS ASCII on NI myRIO

$
0
0

Hi, everyone!

 

I'm trying to acquire distance data from a laser sensor using RS232&MODBUS ASCII on NI myRIO. I attached my VI.

 

I first connected the rs232 port of the laser control unit with my PC using an RS232 to USB converter. It showed up in Device Manager as a COM port. I run my VI, and I got my distance data. The VI works as follows: First, open a VISA resource and configure it according to the laser sensor manual. Then send a MODBUS ASCII command "M0" to ask for the control unit to send distance data. And read the VISA resource to acquire the data, which has a format of "M0,distance 1,distance2".

RS232 to USB converterRS232 to USB converter

success data acquiring when connected to PCsuccess data acquiring when connected to PC

 

However, when I connected the control unit with NI myRIO, my VI stop working. The device showed up in NI MAX under myRIO. But after sending the "M0" command, the VISA resource has ZERO bytes on the port, meaning I didn't get any data (see the highlighted execution).

When connected to myRIO, I got zero byte of dataWhen connected to myRIO, I got zero byte of data

I thought that the I/O settings of the myRIO port might be wrong. Then I showed all the serial settings of both the PC COM port and the myRIO port (seen below). There were three differences between them: Line CTS State, Line DCD State, and Line DSR State. But I couldn't change these settings using the property node because they're read-only.

serial settings of PC COM portserial settings of PC COM port

 Serial settings of myRIO portSerial settings of myRIO port

 

I finally tried to change the I/O settings using NI MAX. I found that the only setting differences between them are Hardware Control under Flow Control Settings (seen below). The differences are CTS and DSR under Input State. But they're grayed out.

PC COM port's Hardware Control settingPC COM port's Hardware Control setting

 

myRIO port Hardware Control settingsmyRIO port Hardware Control settings

 

I exhaust the debugging means I can think of. 

 

Any suggestions?

 

in range values changed before user input

$
0
0

Hi

 

Inside a loop, I am changing the voltage of AO based on user input.

I am reading the output in AI.

I have low and high boundaries but they are changed before the AI changed so I have errors.

How can I make sure that the limit values change along with the value being tested?

I don't want to add delays in the system...

Thanks

 

yonatan

 


VI able to run while error exists

$
0
0

I have an error because a global variable is not defined, but the VI is still able to run.

??????

TomSAVU_0-1610647124965.png

TomSAVU_1-1610647160989.png

 

 

Working with Library DLL

$
0
0

I recently bought a servo control card that I want to operate in LabVIEW 2020 (https://www.amazon.com/WITMOTION-Channel-Controller-Steering-Raspberry/dp/B07VMDFTVR/ref=sr_1_16?dchild=1&keywords=16+Channel+PWM+Servo&qid=1610647217&sr=8-16 )

It works great with the software provided with it (so, the hardware is connected OK).

It has a USB port, and at first, I thought it would run as a virtual COM port, because I've used a half-dozen other servo control devices that did.

But it's not a "serial" device. It shows up (in my 64 bit Windows 10) device manager as a "Human Interface Device" instead. It comes with a DLL and a .h file.

 

In LabVIEW, I tried to use the Tools/Import/Shared Library Wizard, but it keeps crashing. The wizard crashes during a "Parse Header" stage.

 

Since I can see the .h file, I tried to use a manual Call Library Function node.

Whatever I've tried won't run.

 

Here's the text of the .h file:

 

#ifndef _SYSFILE_H_#define _SYSFILE_H_#include<stdio.h>#include<math.h>#define ID 0#define STEPMOTOR#pragma used+void SysInit(void);void Delay(unsignedshort t);short ReadPos(uint8_t ucChannel);unsignedint read_adc(uint8_t adc_input);void WriteDO(uint8_t ucChanel,uint8_t ucData);
uint8_t ReadDI(uint8_t ucChanel);void SetSteeringMotor(uint8_t ucChannel,signedshort sPulsWidth,uint8_t ucIncriment);   /*ucChannel0~6,sPulsWidth500~2500*/void SetMotorSpeed (uint8_t ucChannel,int8_t cTempSpeed,uint8_t ucIncriment);             /*ucChannel0~3,cSpeed-100~100*/void SetStepMotor(uint8_t ucChannel,short sStep,uint8_t ucIncriment) ;        /*ucChannel0~1,iStep-3000~3000*/void SetStepCurrent (uint8_t ucChannel,uint8_t ucCurrent);void SetStepSpeed (uint8_t ucChannel,uint8_t ucSpeed);#pragma used-#pragma library sysfile.lib#endif

In this file, each uint8_t was originally an unsigned char, and the int8_t in the SetMotorSpeed was originally just "char", but I changed them when trying to debug so that they would exactly match the way LabVIEW seemed to want them (see the image of the configure window posted below). I think they're the same thing, and it didn't make a difference either way. The software provided kept working either way, too.

 

An image of my "code" is below. I also attached the vi, DLL and .h files (the original and the edited).

If you look at the "original" .h file, you'll see that I deleted a bunch of chinese characters from some of the comment lines, because I found some other posts in the forum that suggested that the presence of these characters might be what causes the wizard to crash (it didn't help).

 

Also attached is an image of my Library Config window, where I set the parameters for the function call (I'm trying to use the "SetSteeringMotor" function listed in the .h).

 

I tried swapping the calling conventions (C vs stdcall).

I get different error messages depending on whether the "Specify Path" box is checked.

When it's unchecked, the error message is:

The function name specified for this node cannot be found in the library. Right-click the Call Library Function node and select Configure, then choose the correct function name.

 

When it's checked, the error message is:

One or more required inputs to this function are not wired or are wired incorrectly. Show the Context Help window to see what the connections to this function should be.

 

I have the Call Library's error checking set to maximum.

 

I guess the bottom line is that I don't really know what I'm doing with calling Libraries. In the past, whenever I used them, I just modified LabVIEW code that was provided by the device manufacturer. I'm clearly missing something important here now that I'm "starting from scratch" with this device.

 

Any suggestions would be appreciated!

 

 

How to Setup Waveform Chart in DAQmx producer/consumer

$
0
0

Hi All, 

 

I am using a USB-6001 to read in the analog inputs from two PX-303 0.5v - 5.5v pressure transducers. I would like to set up a proper producer/consumer setup and have the front panel display a rolling 5-10min of chart data for the user to quickly recognize trends. This is for active calibration of a part so I will not need to log any data. I am still new to the producer/consumer architecture so I am using some code that was posted with slight modifications.  Any help is appreciated. 

DaqMx Prod-Cons.png

 

 

Using Wrapped VIs From Imported CVI Library: LV Upgrade a Problem?

$
0
0

My instrument is the Agilent E5270B SMU mainframe, and (thanks partly to posts on these support boards) I was able to use the Import Wizard to create a library of "wrappered" VIs out of the CVI library. I do notice I had to use the 32-bit version of LabVIEW to use them.

 

I have been on LV2017 and would like to upgrade to a newer version: However, am I going to need to re-import this set of VIs in the newer version, or can they be converted as part of a mass recompile? Because they are not natively LV Plug&Play, I am concerned that all the links won't translate smoothly.

UI Multi-language with Unicode

$
0
0

Hello

 

So far I was lucky to only need language switching for the UI for English, German and Spanish. But this time I really need to add Chinese. The language should be switchable at run time and it should not depend on the windows settings.

 

So I was starting to read about the possibilities of using unicode for the UI and did some testing (UseUnicode=TRUE). I have a feeling now, that I am facing a time with a lot of headaches..

 

What I noticed in my tests is:

- There is no 'force unicode' setting for ring controls, tables, list boxes, tab control tabs

- When I set a string control to 'force unicode' and enter "Hello" via the keyboard, it displays as "H e l l o"?!?

 

There is a lot of old information out there. So I wanted to ask, if it is possible to develop a unicode UI without restrictions in used types of controls and doing time consuming workarounds in LV2020?

 

Thanks in advance

 

 

 

Viewing all 67020 articles
Browse latest View live


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