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

Issues with case structure inside while loop

$
0
0

I am using two DAQ Assistant to acquire data. The logic is as follows and PFA the VI. 

 

NI USB 6356 continuously monitors for a signal in its terminal a0 from an Arduino's output pin. It can be set to HIGH or LOW. Based on a conditional check, a case structure is executed. Inside the case structure, another DAQ assistant is used to acquire data from NI USB 9215A. Once a preset number of data points are acquired, they are written to an xls file using Write to Measurement File block. The files are saved to a series with a file termination condition matching the number of samples read from the 2nd DAQ.

 

Effectively, I am trying to trigger, once, the acquisition of NI  USB 9215A based on Arduino's output. And this has to be repeated inside a loop, as the Arduino will be generating a pulsed output. Screenshot of the VI is as follows:20181223 NI DAQ TC acquisition doubt.png

 

 

The issue I am facing is that - when the second DAQ Assistant's setting to acquire data from NI USB 9215A is set to 54 samples at 2.7Hz(in N samples Acquisition mode) and the file termination setting for the writing block is also 54 samples, then everything is fine. In order to sample fewer data points, I reduce the number of samples to lesser value and also the file termination to the corresponding value. But DAQ error always props up - Error -200284

 

This is unexpected because by the time the xls file is saved, the Arduino output has changed and hence the False case has to be executed. But this does not seem to occur. To my surprise, the vi is working as expected for a specific set of samples to acquire but not for all possible values.

 

Hope my explanation is clear and please do help me in figuring out the problem.

Thanks!


Sharing control and indicator values over a shared network

$
0
0

I wanted to know of your thoughts of using shared variables broadcasted over LAN versus the use of XML (with Labview schema) or text based sharing of variables over the same network. Would love to hear about pros and cons of each approach.

Application: A generic VI providing a command over the network to another VI which operates an instrument.

 

Thanks

Can LABVIEW read SPI data via USB?

Getting problem while uploading code to myRIO connected with webcam

$
0
0

I am getting a problem in uploading my code to the myRIO connected to webcam.

Waiting for solution. 

Thankyou. 

How to send byte data to serial port

$
0
0

Hello,

 

I am trying to communicate with a non-commercial device that uses RS-232 for communication. I'm using the "simple serial" example vi approach. I know all the correct settings I need ( baud rate, stop bits, parity etc...) so I know that won't be an issue. The question I have is more around implementing what I want to send in the correct format in LabVIEW.

 

My understanding is that VISA expects the message to be supplied as a string type. I was going to simply use the byte-array-to string approach but the problem is that some of the data I will be sending will be numbers that aren't representable in one byte. For example the data I'm trying to send may look like this:

 

MESSAGE HEADER: (decimal)

 

msg[0] = 1

msg[1] = 63

msg[2] = 0

msg[3] = 6300

 

DATA PORTION (decimal):

 

msg[4] = 'C'

msg[5] = '!'

msg[6] = 76509

......

 

How can I work with values as integers so that I can peform arithmetic operations on them, but still have them be stores as U8 byte types for my string input to visa? Should I just forget that function and instead type cast everything as a string value?

 

Thanks!

pulse delay ranging radar

$
0
0

hello everyone:
I have two USRP(2932) one as a transmitter and the other as a receiver,and I have an object"target" located at distance of (1)meter apart of the two USRP ,can the two USRP used as pulse delay ranging radars one transmit a pulses that hits the target and the RX USRP receive the echoes and detect the distance of the target ?

Using NI-9217 with cRIO-9081

$
0
0

How do you configure a NI-9217 in LabVIEW FPGA.  In LabVIEW and LabWindows you would use DAQmxCreateAIRTDChan to setup the RTD Type, Resistance Configuration and other parameters.

 

Thanks

 

Paul

Calling a single re-entrant vi asynchronously and having multiple instances of that single vi run simultaneously on dedicated front panels

$
0
0

Well I know my subject title is probably too long, but that's an attempt to really explain the problem.

First, I had a non-entrant vi that I call asynchronously with flag 80 to fire and forget. Works OK as long as the vi is non-rentrant. (Open vi reference -FP Open- Async call - Close)

 

Now enter re-entrant:  I set execution for the same vi described above to pre-allocated re-entrant" and combine flags 40 and 80. 

The code seems to run but no front panel shows up. (All error in and out indicate no problems) and the cloned reference is valid.

 

So what do I need to differently or in addition for the re-entrant case?

 

Note my objective is to have multiple instances of this single vi running; each with its own dedicated front panel simultaneously accessible. Pretty much like multi-threading I guess.

 

 


Timed loops randomly stop

$
0
0

We have Labview 2014 project that control big stand with many different equipment. Some of them read by serial ports, some by modbus protocol. Each type of equipment read by its own timed loop structure. Our problem that sometimes, let's say once per day, one of the cycles reading modbus devices freezes. And we have no idea why it happens. We have error clasters, but they show no error. Just cycle is freezing, the iteration is not increasing. Any ideas where is problem or what should we do to catch it?

Configuration:

NI PXIe-8135 Embedded Controller

Microsoft Windows 7 Professional (Service Pack 1)

Total Physical Memory 3.48 Gb

Here is screenshot with one of cycles for information.

Thank you in advance.

want to use stepper motor with myrio for xy plotter

$
0
0

I am currently working on a XY plotter project , i want to use 2 steppers motors for that . can you help me with what type of stepper motors to use and what drivers to use . i dont need a much torque . just need to control both bidirectional motors with myrio.

Installing LINX, error 66

$
0
0

Hi,

 

I try to install Digilent LINX (Control Arduino, Raspberry Pi, BeagleBone and more) v3.0.1.192. But…

 

  • VIPM starts installation (LabVIEW 2014 is selected);
  • LabVIEW 2014 opens;
  • LabVIEW crash dialog pops-up (but VIPM stays running); the dialog says

Exception: Access violation (0xC0000005) at EIP=0x053B9498

Version: 14.0.1f11 (32-bit)

  • Shorty after LabVIEW crash VIPM shows “VIPM could not install the package…”
  • I press “Error Details” and see:

Main Package Name: Digilent LINX (Control Arduino, Raspberry Pi, BeagleBone and more) v3.0.1.192

Package Name with Error: Digilent LINX (Control Arduino, Raspberry Pi, BeagleBone and more) v3.0.1.192

Error Message: VIPM could not install the package lvh_linx-3.0.1.192 .

Error Code: 66

Error Source: Invoke Node in Set Control Value {Variant}__ogtk.vi->3867D436DD15F1029E2CFB78BC266B3D->9159A2A3D9C37FCA34AA5FB71955E400->4D0A1F39E16B972C81E5579AA1692697->OGPM Class.lvlib:36A369576D50AC7F094F1B1EC384777F->OGPM Class.lvlib:408245E2B0A5DF321D6A03C68C252F32->A89B07CECE1AA7D54D74F73EE344AC2B->VIPM Main Window.vi

===============

 

  • The same problem appears if I try to install this package in later versions of LabVIEW in the same computer: 2016, 2017, 2018.
  • The same problem appears if I download the package first, then install.

 

So I tried with another computer (very bad one to be frank). The package was installed in LabVIEW 2017 at the first try. This is in computer that is order of magnitude worse than the first one (while both are running under Windows 7).

 

Could you advice how to solve this problem? The second computer is too bad and cannot be used for regular work. I have it only to test how my solutions run in a really slow system.

 

Thank you

NI ELVISmx interfacing

$
0
0

Hello, all!

 

I have generated a signal using NI ELVISmx. I want to import that signal and analyze using block diagrams in the Labview. But, I can't import the signal data generated by the "Arbitrary Waveform Generator" in NI ELVISmx to the block diagram of Labview. Can anyone help in this regard? Thank you and Merry Christmas!

error 8 while saving a new vi through invoke node

$
0
0

I generate a vi through scripting based on a bunch of inputs through the AutoCreateVI in my project. The vi gets generated correctly but I have trouble saving it via the invoke node save instrument function. I close the front panel of the generated vi before I save it but that does not address the error status. I am able to save the vi manually though the file menu of the generated vi, so I do not think it is a permission issue on windows.

 

You can run the integration_scratch vi to observe the issue. You will have to open the create_userform subvi while the testbench is running, select a few bits, click the load button, add a name and click create. Ensure the 2 excel file address' are entered in the input FileVI tabs. 

Labview with Xnet application :Auto reply

$
0
0

Hi ,

 

I have an application built on top of xnet driver. It has read(receive) and write(send) operation. 

 

1. It sends the can message which user has selected.

2. It receives  the can message coming from other ECU and display it on the front panel.

 

 Looking at above functionality there is only one time communication between ECU and labview application for send and receive. Here is an improvement to the application which i am trying to implement. When Labview application receives can mesg from other nodes it should decode the received frame and send an automatic reply through can frame. I thought i could be achieved using scripts which reads the received  can frame and reply it back. But i didn't find any script which does this functions.

 

Can anybody suggest on this and any pointer for this.

 

Regards,

Anand

how can I save the data from Labview FPGA

$
0
0
  • I had only learned labview for several weeks, because I need to use 1MS/s to generate the sine wave and receive the signal for 400kS/s and save the data for 5 minutes.
  • As I know labview real-time (RT) only work for 1kHz for a loop, so need to use the FPGA to generate the signal, but the problem is how can I create the file and save the data?
  • I need to save the generate the signal and receive the data at the same time and save the hole data as much as possible.
  • As the NI9222 example code, it made FPGA to receive the data and show the wave in RT chart, but that will lose too many data so I can’t analyze it.

change vlaue in XML file

$
0
0

Hi 

Recently i need to manualy change the parameter in th XML file(located in the Crio),before there was a database i can download  the parameter file directily into Crio but now the database crashed now i have to manualy modify the parameter vlaue in the XML file.

So i want to make some code to do this modify job,changing at the pc then send the changes,how to do this just change some certain parameter item use labview code,please give some advice or some sample code.

 

How to recreate examples ?

$
0
0

LabVIEW examples are essential for learning how to use various tools in LabVIEW. 

Are there any tricks other than using the 'Context help' tool to learn how to recreate examples ?

 

For instance, I was looking at the "Clamp.vi" example (Machine vision), where an "Invoke node"  (I think) is used to specify a "true" condition for a case structure that draws a new "region of interest". I'm totally lost trying to give an "Invoke node" the same attributes.

 

If someone has any tips for how to find out which blocks are used in the examples, please share.

Compatibility

$
0
0

 Is it possible to use MyRIO 1900 along with Xilinx software instead of LabVIEW??

How to unbundle the data output from DAQmx Read?

$
0
0

I am using the Read Pulse Duty Cycle and Frequency (Continuous) example VI. The data output from DAQmx read contains both duty cycle and frequency information.  I would like to separate the two, so each are their own array. I've tried unbundle, index array, split signals, pretty much anything I could think of that may allow it to split, and nothing has worked so far. I only care about the duty cycle information, want the duty cycle for each period over an entire revolution.

Polar plot to 3D graph

$
0
0

Hello

I need create 3D graph. I have polar graph and this polar graph (polar graph.jpg) I need trasform to 3D graph, but I have matrix 18x36 data. 36 is from 0 degree to 180 degree every 5 degree and 18 is count polar graphs. So I need this all polar graphs put to 3D graph, but this is problem. This polar graphs I need to rotate 10 degrees in X Y axis I mean (example.jpg). In (direction.jpg) is direction drawing polar plot.

I did it by this examplehttps://forums.ni.com/t5/LabVIEW/Antenna-Radiation-Pattern-in-3D/td-p/2886874/page/3 but it is bad for me (my 3D.jpg).

 

Thanks for every answer

Viewing all 69018 articles
Browse latest View live


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