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

Disabling negative voltage NI PXIe-4140

$
0
0

I'm confused about the functionality of the niDC Power Configure Voltage Level Range VI -- For 4140 SMUs an input value x specifies a voltage range from -x to +x correct?

I'd like to range from 0 to +x only (disabling the output of negative voltages).  Is there an ni power configuration I can use to achieve this?

 

 


Acquiring data simultaneously from 9 sensors at high frequencies and extended periods of time

$
0
0

Hello everyone,

 

I want to start explaining that I'm really new to NI products and LabVIEW, and I am currently reading through the Core 1 Materials that a friend lent me. I am working in a project that is looking to acquire the pavement response in a currently in-service highway. To do this, a test section was instrumented with 3 earth pressure cells, 4 strain gages and 2 thermocuples. I have availble a NI cDAQ-9174 and the following modules: NI 9235 (strain gages), NI 9213 (thermocuples) and a NI 9201 (pressure cells). The sensors would go connected to the mentioned modules in the cDAQ, and everything would be controlled through a LabVIEW VI.

 

As part of some initial testing, I connected all 9 sensores to the DAQ and used LabVIEW's DAQ Assistant to get some preliminary data measurements and save them into separate TDMS files. Since I was looking to continually get 1 sample every 0.001 seconds (Acquisiton Mode: Continuous Samples, Samples to read: 1, Rate (Hz): 1000), I could not get any data due to buffer size issues (LabVIEW displayed an error due to insufficient buffer size). In the end, I could only get decent measures with only the 3 earth pressure sensors connected and acquiring data at a rate of 1 sample every 0,004 s (250 Hz).

 

Due to this, I'm guessing that I have to use NI DAQmx functions and assign a buffersize for each sensor individually, with this I could also use different sample rates for each (Thermocuples need to only get 1 sample every second). But, my main worry is that even if I do this, due to the high frequency of acquisiton and my planned mesurement time (4 hours for now), what I'm trying to do might not be reallistically possible. 

 

So, besides the needed storage for the generated TDMS files, is it possible to achieve what I want with my current equipment (DAQ, modules, etc.) and using LabVIEW, while also taking into account that in the future I might need to up the frequency to 2000 Hz and mesaure for a straight 24 hours.

 

I appreciate any help on the matter. If you can also throw in some advice o anything I should have to consider with my project, you are welcome to do so and I will greatly appreciate it.

 

Finally, apologies if I posted this in the wrong section of the board, but it seemed like the right place regarding my inquiries.

 

Thanks in advance!

LabVIEW 5 (!) Problems Building Executable from LLB

$
0
0

Looking for advice from other oldtimers on the list.  I'm working for a client to make mods to a very old test stand that uses LabVIEW 5.0.  All the files are located in an LLB.  When I run the files from the LLB, everything works well, but when I use Application Builder to make an executable, I get an error saying that a subVI is not executable.  Any ideas on how I can troubleshoot this?

Thanks very much.

OS and Network Services: (Hex 0x8ABC7021) Failed to load library. - Windows

$
0
0

I am trying to use the HTTP pallette but I keep running into this error when calling the very first function to open the handle (Open Handle.vi)

 

Error -1967362015 occurred at LabVIEWHTTPClient.lvlibSmiley SurprisedpenHandle.vi:6450001

 

Possible reason(s):

OS and Network Services: (Hex 0x8ABC7021) Failed to load library.


Complete call chain:
LabVIEWHTTPClient.lvlibSmiley SurprisedpenHandle.vi:6450001
Untitled 1

 

I looked through several threads that have a similar issue, but they all show as a problem in a Unix environment. Any ideas?

load .mat data (binary) in labview 8.5

$
0
0

Hi,

 

I would like to use Labview 8.5 to load binary data saved in .mat. I've searched in the forum but found the matlab dataplugin would not work for Labview 8.5. Could someone please help? Thanks.

Null or Invalid .NET References when vi run as subvi more than once

$
0
0
I am programming an application with a CMOS camera using LabView and the .NET framework provided by the manufacturer to interface with it.  I have a VI that can grab a single frame form the camera successfuly.  However, if i embed this as a sub-vi and try to run it more than once, i am getting a null reference returned from one or more invoke or property nodes.
 
I know you cannot run this vi without a camera the image form the block diagram and my description might be enough to diagnose what is going on.
 
vi grabs a single frame from the camera. 
vi simply runs the first in a for loop.  
 
If set to run once, it is fine. If the loop variable is changed from 1 to 2, an exception occurs.  
 
It is unclear to me why this would be occuring, unless there is something different about what is kept in memory when the subviis run own its own vs in the loop.  I do not think I have neglected to close any references, but there may be something subtle I am missing since this is the first time I am working with this framework.
 
Thank you for any assistance you can offer
frame_grab_vi.png
 
loop_vi.png

Setting properties of 'write to measurement vi' from front panel.

$
0
0

I am using "write to measurement vi" in the consumer code. I am saving data into series of file with 800k samples per file. I can successfully do this by editing the properties of "write to measurement vi" (by double clicking on it).
But I want to control these parameters (like file name and path, file format, samples per file, suffix, etc) of write to measurement vi from the front panel rather than by going to the block diagram and double clicking it again and again.
If this is not possible, then I would like to do this:
I can set all other parameters like "number of samples per file", file format, etc by configuring the write to measurement vi from the block diagram.
Then I want to supply the folder address and file name from the front panel.
I tried to do this by connecting file path control to the write to measurement vi terminal. But when I supply any file name in the file path control, it gives error: "file of this name does not exist".
Okay, I know that this is the obvious error if there is no file having the same name which I entered in the file path control.
But when I do the same thing (giving name of the file which do not exist in the folder path) by editing the property dialog of "write to measurement file vi", this function automatically creates a new file of that name (when code is executed).

In short, I want to supply the name and path of the file from the front panel to the write to measurement vi function in the  block diagram. Also, this file is not already existing in the file path. So, my code should create the new file of desired name when code is executed.

Sorry if I couldn't express the problem correctly.

My task is to transmit various signals from 5kHz to 50kHz and receive it using the same board (synchronized transmission and reception). This means that I have to take 10 readings for 4 types of signals. Which means total 40 readings. For this,  everytime when I change the frequency of the transmit signal from the front panel, I also want to change the name of the file (without replacing existing file) where the received signal will be saved. I am using tdms format for data logging. The saved files should have max 800k samples in one file (which can be done simply by using property dialog of write to measurement vi ).
I want that write to measurement vi should take file name and path from the front panel and rest of the settings from its property dialog.
Is this possible?
If no, then please suggest the alternatives.

I have attached my vi for reference.

Thanks in advance.

Choosing a DAQ for my project

$
0
0

Hi everyone, 

 

My origional plan was to use Arduino interfaced with Labview for my project but after discovering the potentional of was DAQ's could do I quickly jumped on board with the idea. I am having trouble choosing a DAQ that would be best for my project, I listed the components to my project below.

 

Brief overview of my project;

I am building a shock dynonameter which tests shock performance. In short, the control system is to start the motor and run a warm up cycle to heat up the shock being tested untill it reaches a desired temperature. Then, the motor is to be ran untill it reaches a final velocity of 16 inch/sec (I figure this linear value can be converted from the hall effect sensor finding the motor RPM). In the "testing phase", Force (from a load cell in between the shock dyno frame and the shock) vs Velocity is to be plotted so that the shock can be analyzed and tuned. I have attached an image of a shock dyno in case it helps with visualization.

 

Components;

-Varaible Frequency Drive (VFD)-This will be used to drive a large three phase motor. I would like to connect the VFD to a DAQ and then control the motor frequency through Labview. **Question: Can I output motor RPM to Labview using the frequency feedback from the VFD?** 

-Load cell sensor: This will be used to form a plot of Force (lbs) vs Speed (inch/sec). The force is the force exerted by the shock and the linear speed is to be converted to by using RPM and stroke length.

-Temperature sensor: The control system is to have two "phases" if you will. A warm up phase, and a testing phase. The temperature sensor is to be attached to the shock being tested and once a desired temperature is met, the warm up phase will be completed and the motor will turn off. After the warm up phase, the motor turns on again and the testing phase begins (this time outputing the force vs speed graph).

-Encoder: I only plan on using this if I cannot find RPM using the VFD. I figure I will need a DAQ with a counter in order to find speed.

 

I was thinking of using the NI USB-6001. It has 8 analog inputs, 2 analog outputs, 13 digital I/O pins, and a 32 bit counter. Any thoughts?


SIEMENS PLC S7 1200 to LabVIEW communication

$
0
0

hi all...

 

Im new to this labview and work on some basic projects with labview..

Currently im working on a project with seimens plc.

 

    For that at first i want to communicate between seimens S7-1200 and Labview. So anyone can please help me in moving forward with this project.

Is there any example labview program or any parameters that i have to do in seimens plc side.

 

    Basically i need to get a communication between both S7-1200 and labview software.

 

 

 

 

Thanking You

Sudhin_sudh

PID control with dynamic setpoint and read/wirte data to files

$
0
0
Hi everyone! I am new to LabVIEW and now I am in trouble with building my VI. I hope I can get some help from here.
 
My project need to apply a PID control to my robot with dynamic PID setpoint. For example, the program need to read the displacement data continuously from a file, and use the data as setpoint to the PID controller VI. Meanwhile, the real time displacement data read from a laser sensor is also used as feedback to the PID controller. When the program is running, it need to be able to write real-time setpoint data/laser sensor reading/output voltage to a file.
 
I build a VI as attached, however, while running the VI, the elapsed time seems to be incorrect (i.e. not the real elapsed time). In addition, the data from the laser sensor is not continuous, which means when the displacement changes, the data shown by this VI does not change simultaneously. I have tried my best to solve this problem but failed. Could anyone who is familiar with this able to offer some help?
 
Thank you very much!
Yuzhe

 

Incorrect data type when writing Typedef to FPGA Read/Write Control

$
0
0

I run into a problem described in one of the topics from 2013. I still found no soultion yet neither myself nor on the forum and I would like to raise the topic again. May be some of you know the way.

 

The problem is wiring Typedef to FPGA Read/Write Control connected to the same Typedef. I can't get rid of a coercion dot. Terminal data type is shown as an Error cluster. But I'm sure that it is not. Here are few screenshots to illustrate.

 

The constant  is connected to the CycleTypes.ctl

FPGA Read/Write Control with the Cycle Type FPGA control selected as input terminal.

1.pngand  we can see that the type of the constant is non-strict typedef CycleTypes.ctl

2.png

 

On the next screenshot we can see that the type of the FPGA control is the same enum. It is not indicated as Typedef however

3.png

 

But if I go to FPGA VI I can verify that this control is connected to the same Typedef.

5.png

 

When I connect two, I get this coercion dot and the type of the FPGA Read/Write terminal changes to Error cluster:

4.png

 

Similar behaviour is observed when reading from Typedef FPGA inicator to Network Published Shared Variable that is connected to the same Typedef.

 

I am programming a cRIO-9035 running in FPGA mode with LabVIEW 2014.  I am using the FPGA Read/Write Control function to pass data from the RT Host to the FPGA Target.  The data the RT Host is sending comes from a Windows UI and is received by the RT Host through Network Stream.

write string to csv

$
0
0

Hello everyone,

I am struggling with an issue in Labview...I am trying to write a string of numbers to a csv file, but I want to be able cu arrange the string by a number of columns inputed from an user. The data.txt is just a sample, the initial file is much bigger, the data.csv is the only thing I managed to write, and I want when I input from a control for example 4 columns to rearrange the csv into my desired.csv. I appreciate any ideas or help that I can get.

 

Nonlinear Curve Fit

$
0
0

Hello.

At the moment i am fitting a temperature profile that is equal to the sigmoid function (first picture).

But in some cases the temperature profile is not equal to the sigmoid function (second picture) and so i have to find another way to fit this profile.

White is the original temperature profile and the red/green is the fitted function.

You will see the fitting code at the end.

Can anybody help me?

 

Thanks, Martin

Need help with error: Error 7 occurred at Open File+.vi:Open File

$
0
0

Hi all, my project is about motion tracking. Its suppose to store coordinates of the objects and save camera footage as AVI file whenever there's movement. However, whenever I run the program I get this error: 

 

Error 7 occurred at Open File+.viSmiley Surprisedpen File

Possible reason(s):

LabVIEW: File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.

 

If I ignore the error, the program still runs fine but I would like to avoid this error anyway or at least avoid the error dialog from popping out. LabVIEW doesn't point me to where the problem is so I'm having a hard time debugging it. Can anyone take a quick look? Sorry beginner here. I just started using LabVIEW a few weeks ago.

Instrument Driver Import Wizard in Labview 2016

$
0
0

I want to use the add on for importing keysight driver which is not available or certified by National Instrument ? However, I found out that it is only available up to 2015 version. Is there any other way to import it in 2016 version?

Regards,
William


Dynamic Variable Speed Signal generation with FPGA

$
0
0

Hi,

 

I want to generate a variable speed signal (sine wave) in closed loop system. The logic works fine if i keep the speed constant in open loop system. Everything works fine if i try to ramp up the speed and stabilize the speed to the ref. speed. After sometime the speed starts fluctuating and stablizes, this repeats intermittently. When i probed the signal externally through oscilloscope, i saw a dc signal in between sine wave which is distorting the speed. The phase continuation of the sine wave is not affected by this dc signal (which i assume a delay creating a dc signal before generating the next sample point). I am attaching the code for the reference. Can some help me to correct the logic if something wrong. 

 

My requirement is to generate a dynamically variable speed signal through FPGA. The Speed updation rate from RT to FPGA module is 5-10ms.

 

Note: I have created a lookup table using FPGA Memory blocks for Speed Signal

 

LabVIEW FPGA Topic for Diploma Thesis

$
0
0

Hi,

i recently started my diploma thesis. I have to programm a FPGA using LabVIEW and include it in a C++ programm. My question now is wich hardware do I need for programming a FPGA with LabVIEW? Are there any models for berginners or only for professionals? I just used LabVIEW for programming normal VIs but not for FPGAs. I am really thankfull for every advise.

Cheers 

XControl as dependency

$
0
0

When using the VI Server method "Vi Dependencies" it will not return non-vi dependencies such as XControls, classes (.lvclass, methods ARE reported) and so on.

How then, do we find these dependencies?  Does at least adding the VI in question to an empty project and then getting the dependencies of the target work?

controlling servo motor on arduino through labview

$
0
0

I have few problems when I try to control the servo motors, which are connected to digital inputs on Arduino Nano, through LabVIEW. 

 

Goal: The goal is to be able to control the motors with a slide I have on the front panel in Labview. And I want it to change continuously. As if I had a physical potentiometer. 

 

Problems: 

  • It changes with a delay. In the picture I had a delay in Labview (1100ms), otherwise it'll not manage to write to Arduino. How can I make the slide change the motors as is mentioned in the goal?
  • I also get an error sometimes error -1073807194. Do you know how I can avoid that problem?
  • When I'm changing the value on the slide and keep the mouse down, the motors moves to the position but then jumps to another position. But if I just click at a position on the slide the motors stays on the set position. Why is that?

I attached pictures on my labview code and below you can see the arduino code.

 

Grateful for some help!

 

Arduino code: 

void setup() {
Serial.begin(115200);
//attach all the servos to the pins on the arduino
for (int currentServo = 0; currentServo < ALL_FINGERS; currentServo++){
servoHand[currentServo].attach(servoPins[currentServo]);
}
for (int currentServo = 0; currentServo < ALL_FINGERS; currentServo++){
servoHand[currentServo].write(LIFT_POS);
}
}

void loop() {
   if (Serial.available() > 0) {

      str = "";

   }

   while(Serial.available() > 0){
      cmd = ((byte)Serial.read());
      if(cmd == '\n'){
      break;
   }else{
      str += cmd;
   }
   delay(100);
   }

finger = getValue(str,';',0);
touch = getValue(str,';',1); //separate the input string from LabVIEW

if (touch == "CHANGE"){
   valueServo = finger.toInt();
   for (int currentServo = 0; currentServo < ALL_FINGERS; currentServo++){
      servoHand[currentServo].write(valueServo);
   }
   TOUCH_POS = valueServo;
   }

}

Testing for Counterfit Flash Drives

$
0
0

There is a growing problem in the Flash Drive Market being flooded with Counterfiet Flash drives that have had their firmware dongled to report more storage than they really have.  This is a huge problem for Flash Drives being sold on Amazon, eBay, and other online stores. 

 

Usually the problem isn't revealed with small flash drives like 8G, 16G or 32G, but as soon as you try to purchase Flash Drives bigger than this, counterfiet flash drives everywhere.  Even though the Technology exists to make a true Flash Drive as large as 2T Bytes, many are reporting far more storage than they really have.

 

Does anyone know where I can find documentation on how to communicate with a Flash Drive at the Machine code level and force writing and reading at specific memory locations?  If I could test a Flash Drive by writing data at the beginning, middle, end and at every 1/4 memory point, I can probably do a very quick test to see of the flash drive is counterfiet or not.  Otherwise I will have to write the full storage capacity of the Flash drive, making the test last for a great many hours.

 

What I've found so for as that flash drives are programmed through firmware to write in a way that all memory cells are written to an equal number of times so when the flash drive wears out, all memory goes at the same time.  However testing has reavealed most flash drives can survive 100's of petacycles and still store data and read it back many times more.

Viewing all 69348 articles
Browse latest View live


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