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

Create square wave pulse with specific parameters

$
0
0

Hi everybody,

 

I am new to Labview and this is my first post. I am working on a project of a potentiostat and I already got the hardware working very well, but I have some problems to develop the control software in LabView. What I need to do is to generate an analog signal with the form of a square wave to excitate the potentiostat and generate my measurement (a graph of current vs. potential).

 

The thing is that the user needs to be able to select the derired parameters of this square wave (the starting  potential, the final potential, the amplitude, the step and the frequency), but I can not figure out how to do it. I did some atempts using the square wave.vi, but I was not able to get exactly what I need. I do not how how can I set the start and final potentials. Other point is that I want to get the measured points only at the end of each direct and reverse pulses, such as the picture I have attached. If someone could help with this would be great. Tips are very welcome!! 

 

PS: I attached the .lvproj file of what I got. I tried to attach the .vi file  to the post but I got and invalid extension file error.


connecting omega TQ514 rotary torque sensor to NI 9411 and NI cDAQ 9178 for RPM measurement

$
0
0

Hi to all,

I have an omega TQ514 sensor and I want to connect it to NI 9411 and NI cDAQ 9178 for measuring RPM. My problem is I dont know the right connection for the encoder to NI 9411 and also the programming in labview. When i tried it says that I must add external clock source and I dont know where to get it?

The sensor has four wires, encoder power(+5V), encoder ground(GND), encoder lead(CW lead) and encoder trail( CW trail)

I'm new to NI and labview applications, Can somebody here has experience using the same set-up? Smiley Sad

LabVIEW siemens simotion d425

$
0
0

I have a project need use labVIEW to control siemens simotion D425,Can you tell me how to do and  have the  tutorial.?

Thank you very much!

 

Scripting: type specifier VI refnum

$
0
0

I want to create some scripting tools to automatically create wrappers for existing class methods to call the method dynamically without the need to have a dependency to the class.

 

Something like this:

Example.png

 

but i'm having issues in generating the type specifier VI refnum.

If i create a dummy vi containg this code manually, and traverse the block diagram, it almost seems like the object doesn't fit in anywhere in the VI server model.

The classname is "ControlReferenceConstant" 

 

I tried numerous ways of generating said reference, but each time it tries to put an actual static VI reference to the VI, or throw some obscure error.

 

Anyone any ideas on generating this type reference?

Data Acquisition and Processing

$
0
0

Hi everyone,


I am trying to collect Analog (Voltage) data from a DAQ continuously at sampling rate of 1kHz and 100 samples per acquisition. This limits my data collection while loop to run at 10Hz. I would also like to process the data (do some differential and averaging operations), however I would like to do so at a faster rate (100Hz). The differential has to be with respect to run time.

 

If I use two loops and a queue, the second loop's runtime depends on the first. How can I calculate the time differential of the data? Attached is the VI. I apologize if my problem isn't clear as I am relatively new to LABVIEW.

 

Thanks for any help!

Can I configure a only channel like measurement Period?

$
0
0

Hello Everybody,

I am working with NI 9421 module. This module is a digital input. I configured  a channel like measurement of period. My problem is that when I configure a channel like measurement of period  all the channel change  their  configuration and I need that the others channel are working like digital input.

Any ideas will be very helful.

Thank you.

A regard

Pedro

 

Dual Slide Properties Set in Case Structure

$
0
0

Hello, My objective is to change the properties of a dual slide indicator depending on the value.  I have a target value and actual value.  If the actual value is greater than the target, the fill is green between the target and actual values (fill style=3 to value above).  If the actual value is less than the target, the fill is orange between the target and actual values (fill style=4 to value below).  I am able to accomplish this by selecting properties on an individual slide, however, when I use a case structure and property nodes, the result isn't what I want.  A simple example is attached.  

Also, is it possible to set properties of Slide 1 and Slide 2 in the property node? 

*Complete Newbie* Using raspberry pi to forward readings live to a server

$
0
0

Hello

 

I am completely new to LabVIEW, and have some limited programming knowledge in python and C. 

 

I am looking for a little help. I have a program written by someone else gathering strain gauge data through NI 9219 modules which is then connected to a laptop over Ethernet (from a 9188) and assembled into a CSV file. In order to generate the CSV, the program must be stopped, the file written, and the program restarted. It also requires a dedicated laptop to do this. 

 

I have a requirement for the data to be sent live to a server, and would like to free up the laptop too as using it has it's own set of problems. I want to use a raspberry pi to take the data from the loggers and send it on live over WiFi to our server rather than the current system. 

 

The trouble is I am a bit out of my depth here... Is what I am trying to do even possible? And, if so, do I have it right that the correct way would be to connect to the 9188 (how?) with the Raspberry, assemble the values into a string (using python?), and forward them directly to our server? 

 

Apologies for the complete "novice" questions and lack of understanding. But any help or advice that could be given would be very much appreciated! 

 


fuzzy logic type2

$
0
0

Hi,

i need fuzzy logic type 2 in my project.

how can i make it in labview?

 

regards,

Chista

Using Network Streams to share data between VIs on the same PC

$
0
0

Hi everyone, 

 

I want to share a couple of arrays to another VIs on the same PC. I decided to use Network Streams but I couldn't be sure about that. Do you think that it is a good idea to use NS or not? Do you suggest a better method? I want to build an optimized way to share data.

 

Thanks in advance,

Emre

Array Max/Min not working with Waveform chart - History data property node

$
0
0

Hi,

 

I'm having trouble figuring out why i can't use the Array Max/Min function to retreive the max/min values of my waveform chart..

 

The error i'm getting is "Polymorphic terminal cannot accept this data type"

 

attached is the picture of what i'm trying to connect..it seems pretty simple and correct but I guess i'm wrong about the correct part

 

Any thoughts? my program is basically graphing date/time and one temp measurement every x seconds on a waveform chart.

 

All i want to do is allow the user to see what the max and min temperatures were from this waveform chart.

 

If I should be doing this in a different way, please let me know!

Thank you for the help

Detecting Phase Wrap

$
0
0

Hello,

I'm attempting to compute gain margin.  Is anyone aware of a function that will detect the locations (indicies) in an array of phase data where the phase wraps?  I have access to all NI toolkits as well but have not been able to find a function do to so.

 

I've attached a simple example that attemps to detect the indicies in the phase array where the phase wraps around ±180° but think that it may be succeptable to false positives resulting from signal noise.

 

Any suggestions on a better way to do this are greatly appreciated!

 

Thanks for your time.

Steve

Update XY Graph during Nested For Loops

$
0
0

I am trying to update an XY Graph in each iteration of a "For Loop". The only way i can get it to somewhat work is if I place the graph outside my loops and tunnel the data thru. If i place the graph inside the inner loop, it will plot the first iteration, then clear graph, then plot 2nd iteration and so on. I want the graph to plot and update on every iteration ... any ideas ?

 

 

NestedFORLoop.png

Simulated device DAQ assistant

$
0
0

 

I configured the DAQ assistant to read a digital line input from a simulated PCI-6221 DAQ device. The values generated are correct while using the 'run' button in the DAQ Assistant configuration window (LED flashes).

Whereas, while running the VI the DAQ assistant always returns zero. I tried using the NIDAQmx functions instead, but no change. 

 

Even when using the analog input (one sample on demand) in a loop, the DAQ assistant always returns the same value (-0.15)

 

Tried a couple of suggestions on this forum but still same, looks like something very basic, but unable to zero it down.

 

This is true for both LabVIEW2014 + Windows 7 + NIDAQmx 14.5 

<and> LabVIEW2016 + Windows 7 + NIDAQmx 16.0

 

Thanks in advance.

 

 

 

 

DPO 4054 force trigger event

$
0
0

I have a Tektronix DPO 4054 O-Scope, connected to computer with USB, running LabView 2013 with tkdpo4K drive s/w, I'm trying to force a trigger event with labview. I'm not seeing a trigger vi that I can use, also I refereced the dpo-4000series programmer manual and sent a TRIGger VISA command as stated on page 2-49 of the manual that did not work either.


Bug in NI PID VI?

$
0
0

Cross-posted to LAVA: https://lavag.org/topic/19920-bug-in-ni-pid-vi/

 

In NI_PID_pid.lvlibSmiley TongueID.vi, it appears that integrator anti-windup is implemented such that the accumulated error is set so that the sum of the integral and proportional action do not exceed the control limits, but that causes this:

PID Example.png

There are two things that I don't expect here that I believe are caused by the anti-windup implementation: The first is that the controller is initially saturated high, but backs off despite being far from the setpoint and having high proportional gain. The second is that upon lowering the setpoint, the controller output goes negative, despite the process variable having always been below the setpoint (and no derivative gain).

The integral gain in the above example was so low that it doesn't have much of an effect on this timescale. Setting the integral time to 0 turns off integration action and anti-windup in PID.vi, and this is what happens (and this response is close to what I would expect to see on a short timescale with a low integral gain, but with the absence of slowly accumulating integral action):PID Example 2.png

Again, I hope I'm just overlooking something - it wouldn't be the first time.

Reading XNET values with NI 9862

$
0
0

Hello,

 

I'm trying to read CAN messages using XNET vi's. I run a cRIO RT with an NI 9862 card. I've created an XNET session to read a single message but no data is coming through.

 

The dbc file has been supplied from a customer that we need to be able to communitcate with an ECU. Using Busmaster I can read messages from the ECU without a problem. I don't get any data coming through on XNET using VI's and I dont see anything at all on the XNET Bus Monitor.

 

Any ideas on what I could try on the XNET side? 

 

I'm using XNET 15.0, LV14 and NI RIO 15. 

 

Thanks!

RT Shared Library Import (.so) Arrays

$
0
0

I have a shared library (.so) file for the RT environment that I have to use with my RT LabVIEW code. The import wizard works easily enough however the way labview is importing fixed length arrays is very strange. Here is an example of one structure containing some fixed length arrays:

 

typedef struct dome_ShutterC {
   float Calibrated[16];
   long Raw[16];
} dome_Shutter_Ctl;

Labview Control.png is an image of the labview generated control for this structure. As you can see instead of accepting an array it is defaulting to breaking the array out into individual array elements.

 

Does anyone know how to change this default behavior into accepting arrays?

 

Serial communication Modbus RTU between CPU and Speed variator

$
0
0

Hello,

I have a labview programm which can show me the values of registers of the menues of the speed variator Unidrive Sp in real time and can let me change values of the registers in real time.

Now i want to add in this programme a table with register adresses of the menu 0 only  and to read them.

I need your help.

 

 

Feed Daqmx analog output with data from 1D array

$
0
0

Hi everyone,

 

I am working on a project of a potentiostat and wrote the code to perform cyclic voltammetry in LabView. I want to generate a cyclic potential ramp that goes up and down at specific potential range and rate. I got it working, but the problem is that when I use this ramp to feed the DAQmx to generate an idential  analog output it does not work. I already tried to index the array but it did not work. I am newbie on labview and do not know how to fix it. I attached the code of my VI and highlighted the point I am facing problems. If someone could helpm me would be great.

Viewing all 68960 articles
Browse latest View live


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