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

what is .Net and Task ID...?

$
0
0

Hey, I am very new to Labview and have been working with a version previously installed in one of our systems for 3 days now. Previous users wrote a program that communicates well with a stage that moves in X and Y plus does all other fancy stuff. I created a VI at the moment that is able to move stage in X and Y direction. My code runs fine and I can see stage moving in correct coordinates, however, I don't understand exactly what some parts of the block diagram does.

I've attached the basic .vi ,

what I want to know what exactly Control In and Control Out do, (that contains .NET which I don't understand.) Why Control In has to be wired to case in stead of directly to the Execute Command..

Also, there is a task ID that goes to Enable Commands, I understand that if I put 1 and 2 numeric values it basically tells the machine which direction to move first but I notices some users also have in a different form (instead of numeric values) which is in .Net form. Again I am wondering what exactly .Net File do.

Also as you see in the code there is a format into string, I copied that command line (DWELL 1; Linear.....) from a similar code, I think it is G-Code command. I believe that this is how machine knows what speed to obtain and which position. If so where do I get more information to learn about similar G-code commands. Thanks a lot Smiley Happy

 


Error -89215: occuring at DAQmx Start Task

$
0
0

Hey guys,

 

Really need your help with this. I've combined two VIs that I have, one measures in cylinder pressure and the other measures time between encoder pulses. Both were perfectly well individually but when combined together, give me this error when I run the VI. I've attached the VI below and pics of the error. Can anyone shed light as to how I can fix this?

 

Both use encoder B pulses as external clock source and the Z signal as the trigger to start acquisition. 

 

Please help!

Create database for csv file

$
0
0

Hello Labview Users, 

I happen to have thousands of csv data file that I work with. The only way I recognize them is putting their characteristics in the file name. Which brings the problem of making the names too long and Microsoft doesn't like to accept long name. So I wanted to build a database for all my files. I am in the preliminary stage of building it ( I have attached the file and some of you may have seen it before). 

What I want to do is, have all my files in the database with random names and list them based on their characteristics. I want to do that in my application in the place of 'file' box. So that I can click on the file and run it (double-click on the file in application to make them work in active file). based on the parameters listed on the database I want to filter them to find any specific file. How the interface of database should look like is shown blow. Screen Shot 2017-06-28 at 4.34.31 PM.png

It doesn't have to be a real database, just a directory application. I am trying to make it without the database toolkit.  If anyone can help me out and guide me out or guide me in the right direction then that would be great. Thanks. 

Incorrect flow rate readings at a start-up with a NI9401 module

$
0
0

Hello, lovely community,

 

The board is a cRIO 9068. I am trying to measure flow rate by using a Webtec LT300 flow meter with the following characteristics:

Frequency output 20 – 2000 Hz;

Voltage output 30 mV – 10 V (I am using a Schmidt trigger circuit with a gain, to get the voltage signal of at least 2V all the time);

Inductance at 1 kHz - 1.55 H;

Impedance – 3700 Ohm;

The housing in grounded. Frequency outputs plus and minus go to the Schmidt trigger, and after that the output from it is connected to the NI 9401 module. Output to the pin 16, 0V to the pin 17 (not sure that I even need but still).

I read that since I am measuring frequency lower than 4 kHz, I should use the period counter mode, and then take the frequency from it. After that I convert the frequency to the flow rate, since 20 Hz – 3 lpm, 2000 Hz – 300 lpm. That what I was implementing in the code.

 

The code is designed in the scan mode with the scan engine sample time of 5ms (don’t need it faster than that since I have other sensors in the system). The problem is a spike in the frequency/flow rate when the flow meter cranks up. It goes straight to the maximum value, then decreases and show the real flow rate (labview flow rate file).

By investigating the possible causes we have noticed on the oscilloscope that the first impulse from the Schmidt trigger gives us this problem (scope_response file). As it can be seen from the picture, the frequency of the first output goes to 1.2 kHz and higher, and only after that the trigger output starts to behave normally.

But in my case it is imperative to actually see a real spike, because I am checking dynamic characteristics of the tested valve. So the question is, it is possible to eliminate the observed effect in order to get a decent start up plot?

 

Thank you in advance for your help.

Realtime FFT analysis

$
0
0

Hello, 

I am trying to perform an FFT calculation over multiple times in real-time on an incoming waveform generated from a .mat file. This waveform repeats it self every 0.1 seconds, and I would like to perform an FFT calculation for every period for peak magnitude. 

 

My current methodology has been the following

1) I build a waveform by using the .mat file and defining dt between points

2) I index that signal so that it can be fed into the buck converter in multisim

3) I take the output voltage, and convert it back into a waveform so it has a time component

4) I convert that signal into an array, divide the array into 10 components (1 for each period) and feed that, along with the signal, into the FFT VI

 

Step four is where I am really lost. I don't believe my FFT calculation is being done correctly, and furthermore, I am always getting this error about 0.5 seconds (sim time) into the simulation. 

Unable to converge during transient analysis. 
Consider increasing the ABSTOL, VNTOL, and RELTOL options.

I am unsure how to fix that as well. 

 

I have only been using labview for a week! Help! 

 

mat file, VI and circuit have all been included

 

Thanks! Smiley Happy

 

 

Bundled dynamic event registration

$
0
0

Hello,

In my latest project I tried to streamline some dynamic event registration with control reference clusters and I just can't find an explaination for this behavior.  I have a sufficient work around and I'm only looking insight into why this is behaving this way I just can't do the things I want to do.

 

Issue:  When dynamically registering a cluster of control refs to multiple events in a single event registration node, only the first event is properly handled.  All other events assocaited with the same cluster of refs register and trigger but the event structure subscribed to the event reg shows the event as (unhandled) even if there is an event case for that particular event.  I can multi-register a cluster of user events and a cluster of control refs sucessfully (not shown in the code below).

 

Here's the code that works.

event_reg_gogo.png

Here's some that doesn't.  Only value change event case is handled.  If the order in the event reg node is changed the top event is always handled.

event_reg_nogo.png

 

A less desirable workaround (not as flexible for me and without strict typing on the second bundle, the event case names can get pretty long)event_reg_ewgo.png

 

My apologies if this is documented somewhere and I missed it but if anyone want's to try and explain this I would greatly apreciate it.

Thanks!

Nested while loops : inside loop not working

$
0
0

In my VI, i want ,for each value of outer-loop, inner loop should run completely. But in my case for every alternative value of outer loop, inner loop only runs for 1 times only, while it should run n-times.One can check the 'results'.

I am new to LabView and would appreciate  any new way of doing the same code.

 

Aim of the code:

For each value fed to outer loop, inner loop should run n times forward and backward depending on 'single sweep ' status. I have included case structures inside each loop to be able to do forward and backward sweep of values in both loops.

 

Access cluster within cluster through control refnum

$
0
0

I have a cluster1(with 2 numeric controls) with other controls within a cluster2. I want to pass this cluster2 to subvi as a control refnum and then set cluster1's numeric control 's value. How do I do that? I cannot simply unbundle cluster2...


Plot in Waveform chart

$
0
0

I don't want the users(operators) to edit the plot name in waveform chart during run time. Any property node or any way is available to do it. Photos attached

Empty Payload CAN Frame Stream (J1939 BAM)

$
0
0

Hello,

 

I discovered a strange phenomenon in my LabView programm. I have a sensor which is sending process data (20ms) and multi frame data (1ms) into a J1939-network. I created a VI, which reads multi frames in the J1939-network (messages are called BAMs). The strange thing is that there is a difference between what my VIs reads and what the xnet-bux-monitor reads. In some frames the payload is completely empty (like in the picture below), but the ID and timestamp is shown.

 

I based my VI on this example: http://www.ni.com/example/31215/en/#toc10

I removed the sending part and added a sub-vi which sorts my BAM messages and two error counters. Also I added a vi for stopping the session and flushing the buffer after the while-loop, without this I always gets an overflow of the buffer after a few seconds.

The VI is also in the attachments. Do you can spot any mistakes on it?

 

Thanks a lot.

Chris

Help with changing Vi

$
0
0

Hi all,

 

I have this Vi that was given to me to start communications to a Drive that is in the application. It works great, but it's missing some functionality. We're experiencing an issue where the drive may be faulted externally to the PLC (so we don't know about it) the the comms is dropped from the drive. I need to change this Vi so that I can choose to start it again.

 

Currently the Vi tries 3 times to establish comms, if it doesn't it just stops, if it does, it stops and is never called again. What would be the easiest method to call this Vi to run again even if the loop counters have stopped the loops? I'm not asking for someone to do it for me, but I'm still learning LabView and it's not obvious to me where to start.

 

Heres the Vi:

Vi.png

 

Thanks in advance!

XNET remote connection to PXI

$
0
0

Hello,

 

I want to use the XNET-Cards in a PXI realtime system from the (Windows-) Host PC. The application code would run on the Host-PC and XNET data would be sent/received via a TCP/IP connection between Host-PC and realtime system. This is the same configuration that is used by the XNET Busmonitor (port 13456). My question is if the protocol used by the Busmonitor is documented somewhere and if I can use it for my own application. If not, I will have to write my own little server-code running on the realtime system. But before I do that I just wanted to make sure I'm not re-inventing the wheel.

 

Thanks & Regards

Dirk

Dani robot

$
0
0

Does anyone have a project for Dani 2.0: follower?

thank you, it is urgent!!!!!!!!!!!!! Smiley Happy

Reserved resource error with multiple AI inputs

$
0
0

I'm trying to do something that should be fairly simple, read three AI channels each on three tasks. The task LBHamps is on a cDAQ 9219 module channels 0, 1 & 2. LBHPSIin  is on channels 0,1, 2 on a 9201 module and LBHlpm is 3, 4, & 5 of the same module.  The problem I'm having is I keep getting an error -50103 "specified resource is reserved" from the last control task.vi of the three to initialize. It doesn't matter what sequence I run them in it's always the last one. Without the control task.vi I get a different but similar error about the resource being reserved.  

What am I doing wrong?

Capture.PNG

DMA to camera memory via pointer

$
0
0

Is it possible to read the memory contents directly from the camera's memory?  In other words, If the Invoke Node can provide the pointer to the active memory, can we access the memory location directly from the camera instead of using the CopyToArray function?

 

The reason for asking is because a client needs to read the image faster than 4ms/MB that it takes the function to read the image data and write it to an array.  Below is an image of what is implemented and what is desired. 

 

Below is what is desired. 

 

Below is what is currently implemented. (I did not have the Vision toolkit installed on this PC).

 


Displaying Input output on labview

$
0
0

I am running Node-Red on a Raspberry Pi3. The node-red program allows me to run the Input/Output modules. I was wondering if I can use Lab-View to show my results from node red on the front panel of Lab-view or do I have to create a separate program in Lab Vie to run my I/O modules. I want to display my output from the Input/Output modules. I am running my I/O modules with the help of node red and raspberry pi. When I turn on the input modules it turns the led on the output modules. Can I display the same on/off message from the led on labview? I don't want to write the whole program in lab view again as I already wrote it in Node-Red. I just want lab view to display my results in the fron panel. Can someone please help or give some suggestions?

Created Subvi deos not work

$
0
0

I am new to programming in LabVIEW and I have tried to create a subvi in the Block Diagram. The Subvi works properly in the separate VI. when I dragged it to the Block Diagram, It can not be activated. That means I could not wire it to the input parameters. Also, the subvi creating option in the Edit button is not highlighted.  I attached the related photo below. I hope I could figure it out with your help.

Thanks.

 

Taking multiple measurements at trigger, then calculate mean and save to file

$
0
0

In the file attached, an array of binary numbers is used as trigger. When the trigger outputs 1, the element in the other array (data array) is recorded at the same index in the trigger array (this index can be shifted by the "index shifter").

 

What I would like to achieve:

When the trigger outputs 1, N number of elements of consecutive index is measured from the same index in the trigger array. The constant N can be changed via a control. And then these consecutive measurements are averaged and recorded to a text file.

 

Example: If N=3

Trigger array           Data array

index element         index  element

0       1                      0        1

1       0                      1        2

2       0                      2        3

3       1                      3        4

4       0                      4        5

5       0                      5        6

 

(1+2+3)/3=2        (4+5+6)/3=5

 

Outputs: 2      5

 

Any help is greatly appreciated, thank you!

LINX + Arduino loops faster than 1 ms?

$
0
0

I am trying to create a physical LED array using Arduino + LINX and making a driver program with Labview. This means that I need to multiplex with loop times in the microseconds. I know that Windows cannot generate a reliable time under 1 ms but I am pretty sure the Arduino can since we are able to simply use the command delayMicroseconds(). Is there any way to use LINX to generate a signal that is faster than what Windows is capable of? 

Drivers for BK Precision 1901B

$
0
0

I have a BK Precision 1901B power supply that is connected to my computer through USB. I have looked and been unable to find a driver that allows me to control this device with Labview 2015. Does anybody know of any drivers for this device? If not, are there any other suggested ways to control this device with Labview?

Viewing all 69079 articles
Browse latest View live


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