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

What do I need to interact a piezo servo controller with a load cell via LabView?

$
0
0

I'm currently developing a Micro Fatigue test rig. The objective is that the piezo actuator with piezo servo controller outputs a sinusoidal load on the specimen. The proces is force controlled so the displacements need to be alternated a bit to make sure the max, min and mean force remain constant. So to give a feedback I have a dynamic load cell with amplifier which gives an analogue signal of 0-10VDC or 4-20mA. The piezo servo controller only can have position signals as input so that has to be programmed in LabView. I don't have a lot of experience with LabView so what do I need to let the load cell and piezo servo controller to communicate via LabView? I'm guessing a DAQ system but I'm not very experienced with this. 

 

See the pdf-files for some more info on the actuator and it's controller.

 

 


[DAQmx] Adding data to write buffer

$
0
0

Hello, I have a program that should send a waveform (a sine wave for example) to several channels of an NI multifunction board. This board has multiple AO channels and I want to use all of them. The user should send waveforms (can all be different) at any time and the resulting voltage and current should be displayed live.

 

Normally you would simply send the entire waveform array to the DAQmx write function and read it back every 100ms or so. But I want that while one waveform is being read (can lasts several seconds) the user should be able to send another waveform on another channel. With the DAQmx write function you have to send the entire waveform for all channels at the same time, which is not good when one waveform has already been written.

 

My strategy for this problem is to divide the waveform into pieces of 100ms worth of points. Then send those pieces every 100ms while the input is read continously. I've attached a test VI that I quickly made (sorry for the messiness). You can send a waveform to either channel 0 or 1 and any time and also while there is already a waveform being send. It works, but at high sample rate, the signal jitters at regular intervals. Like this:

Basjong53_0-1599042199484.png

 

 

I've been trying to use the buffer as follows: Add 200ms of data and then every 100ms after that add another 100ms of data. In this way there should always be between 100 and 200ms worth of data in the buffer, but jitter still remains. In fact there is no jitter the first 200ms and then it it appears. So it seems to me that the buffer is not properly used. I'm not sure how to properly use it. Can anybody help with this problem?

Add or change label and datatype. Numeric representation or string

$
0
0

In my application I often have to create a data structure which consists of several different datatypes.

ExampleExample

The way I create it is in a cluster with a numeric/string control.

1. Add new numeric/string control

2. Change the name of the label

3. Change the representation. 

This is done maybe 100 times and takes too long time and is impossible to make without errors

 

Is there a better smarter way?

From another Vi I have found a way to change the Label. But the numeric representation or string does not seem to be possible

I have the C++ header file

Piloter Itech IT7622 avec Labview

Two edge separation timeout with NI cDAQ 9174 and NI9401

$
0
0

Dear

 

I know this has been discussed before but in another way.

I can set the maximum time in the selected unit.

Thats OK.

The question is is this equivalent to the timeout?

It doesn't seam to be.

How can I limit the time of measurement?

 

Regards

Martin

Tab Control Question

$
0
0

Is there a way to programmatically assign a control to a particular page of the tab control?  I am programmatically repositioning a control from outside the Tab control to within one of the tabs.  Then, if I click on a different tab, the control is still present in the second tab which I don't want. 

That doesn't happen with controls that are originally located in the first tab.  I see that there is an owning pane property that can be read from a property node, but it cannot be written to.  I'd prefer to not have to move the controls again when the active tab is changed.

IP Integration Node syntax error line number

$
0
0

I'm trying to import some .vdh code into a Flex RIO via the IPIN.  I'm using LV2020 which uses Vivado 2019.1.1.

When I "Check Syntax" in the PIN wizard, I get an error referring to a line number in a temporary file LabVIEW creates.  I can grab this file about mid-process before it's deleted, but it's encrypted.  So that's no help.

 

Question: What line number in the original file, matches the line number (221) referenced in the error?

How can I use this error message to debug the original file?

 

"ERROR: [Synth 8-2715] syntax error near end [C:/NIFPGA/iptemp/ipinFD8C09DB786F464386FBFA445B00346D/Vivado/GwAddler.vhd:221]"

 

 

 

 

Data Logging

$
0
0

Hi everyone,

 

I'm creating an interface where I have to report cumulative energy spent. It cannot reset to zero every time the executable runs, kind of like the mileage on a car. How can I do this? Is this even doable? My idea is to log the data and then have labview maybe read the last value from the file when the executable runs and then continue to log data, and then save the last value for the next time to continue to log data.

 

Thank you,

Omar


Transforming a Waveform chart to calibrated values

$
0
0

I'm trying to take an array of waveforms, and update each one so its values are all calibrated properly. I assumed that I could simply calculate each value and reinsert it into the waveform, which for the most part seems to work (the values in the waveform object are correct), but when I try to put it on a waveform chart, it does not display properly. Any ideas why this may be happening?

tholmvik_1-1599081914300.png

 

tholmvik_0-1599081881862.png

 

Trouble communicating with COM port

$
0
0

Hello All,

 

I am having an issue with erratic reading and logging of COM port data. 

 

The connection is as follows My computer -> USB cable -> FT232R board -> Device under test.

 

The device is set to output a message containing ADC values every 14 ms. A standard message looks like:

 

{"type": "log", "msg": "83948 -467237 -1891949 -3490623 1435677 1 0", "level": 20, "time_ms": 83948, "path": "REL_main.cc", "line": 82}

 

However, every once awhile I get a message that looks like 

 

{"type": "log", "msg": "84746 -467120 -1892005 -3490712 1435640 1 020, "time_ms": 91508, "path": "REL_main.cc", "line": 82}

 

or even 

 

{"type": "log", }

 

As you can see from the VI I have attached. I have tried to eliminate these "bad" messages by limiting the storing of the data to only messages that fit in the range of the expected byte count. The range is large because the message contains a timestamp that grows over time. 

 

Can someone help me understand why this is happening? and please let me know what the fix is? my guess is that my computer doesn't produce a stable enough clock signal but of course I'm a rookie and I could be wrong. Please help. Thank you in advance

 

 

Class icons change after reloading project

$
0
0

I have a strange problem. I have a project with some classes. These classes have a (simple) custom icon, that is working well. However, sometimes, when I reload the project, the class icon changes to this:

Basjong53_0-1598518095781.png

Even weirder, when I click on 'Edit Icon...' to revert to my custom icon, the custom icon is still there!

 

Basjong53_1-1598518178906.png

 

When I create a new VI in the class with the weird icon, the VI will have this icon as the default overlay, not my own icon.

I have to manually click 'Edit icon...' for each class, press OK and apply to each VI every time, really annoying. 

Does anyone know what is happening here?

Wifi communication with a µc: trying to avoid conflicts

$
0
0

Hi all.

 

I'm taking over the development of an application that serves as a user interface to control a distant platform.

On this platform there is a µc with which I have to communicate by Wifi to get all sort of data (Battery, Power, attitude etc) and control a few actuators on it.

 

Problem is the communication has been badly handled and I am having a lot of conflicts between what I send and what I'm supposed to receive.

Typically, a request will be "?H" (but also "?M" "?S" "?B") and answer to this will be a serie of data structured like

[Error Code, CRC, H (If request was ?H), DATA REQUESTED]

But the program uses tons of parrallels loop that aren't synchronized nor organized in any way and these loops often call the wifi vi with their own commands as input. Result is I receive too often the "wrong" answer : Requested ?H, but receiving the answer to ?S.

It's difficult to share any code at all as it wouldn't be working anyway, but below are a few pictures to illustrate what I'm struggling with. 

 

The guy has been using semaphores in the wifi vi to avoid conflicts, but it's been proven ineficient.

I tried to reduce the number of time this VI was called everywhere (by increasing the loops delays), but still, no good results.

 

I'm trying to find a solution without having to re-do everything, being myself not very well experienced yet, that would take me way too much time. Any suggestions other than "burn your computer and start over", are very welcome 😄

 

I have to put a trigger warning somewhere, this code uses an excessive amount of shared variables. The connection ID and semaphore are initialized at the beginning.

WifiBridge.png

 

TCPExecCMD.vi :

ExecandRead.png

 

TCPReadString:

ReadCharacter.png

 

And here is an example that illustrate globally what the program does in term of parrallel calls:

Example.pngExample results.png

 

 

If you have any suggestions...

 

Thanks a lot in advance,

Vinny.

 

Data Subtruct Method change

$
0
0

Hi all

    I want to median calculated with 1D array,rule as below:

array[10]-array[0]

array[11]-array[1]

array[12]-array[2]

array[13]-array[3]

 

snapshot has done with  result,someone have other way simple to do that,thanks!!

 

Need Help with Base58 encoding

$
0
0

base58 FP.jpg

This is driving me nuts. I attempted to modify a base64 VI. I get the 51 characters I am looking for but they are not correct.  I am using the modified base58 Character set, it doesn't use 0O or L.base58.jpg

Unable to get the coordinates of ROI correctly

$
0
0

Hi all,

 

I am trying to obtain the grayscale values of pixels from a region of interest. The way I am doing is (1) converting the whole image into grayscale values and plotting an intensity graph.  (2) drawing an unflattening pixmap of the same image then drawing rectangle on the region of interest to get the coordinates. The problem is there is an offset in the coordinates of the intensity graph and the image means I am not getting the values from the ROI. Is there a way to remove the coordinates offset ?

 

Thanks and Regards

Hassan


Using the Community Version To Undertake the Core 1 Course

$
0
0

I have just bought the Core 1 distance learning course and may have wasted my money

The initial lesson gets you to set up a virtual system to use within the course.

 

It instructs you to go to Devices and Interfaces and at the top of the page select "Create new"

 

However, as I am self funding this I only have the community version of labview to use.  This does not have the "Create new" dropdown box in Devices and Interfaces.

 

Is there a way that I can complete the course using the community version of Labview or have I wasted nearly £500?

Shared Excel Workbook does not minimize as expected.

$
0
0

I noticed a strange behavior Report Generation Toolkit when using an Excel file which is set to be Shared Workbook.

 

I have a piece of code that opens an Excel file and reads its content.

I use native RGT VIs, no modifications.

 

This is how I open my Excel file:

Excel_Open.PNG

 

When my Excel file was not set to Shared Workbook my code opened Excel file minimized and read data properly.

 

When I changed Excel to be in Shared Workbook mode my Excel does open, it is minimized at beginning but as soon as RGT reaches Excel_OpenWorkbook.vi the Excel window is back from minimized to normal.

Excel_Open_Inner.PNG

 

I can minimize it back programmatically, but the Excel still pops up for a fraction of a second which bothers me much.

 

Fit convoluted data with response function

$
0
0

Hi,

 

I wonder if it is possible to fit with convoluted model function, for example, numerical Instrumental Response Function (IRF) and exponential decay.

 

I found related threads like 

 

https://forums.ni.com/t5/LabVIEW/Nonlinear-curve-fitting-and-convolution/td-p/733833/page/2?profile

https://forums.ni.com/t5/LabVIEW/Curve-Fitting-with-Convolution/td-p/493836?profile

 

But, I still don't understand detailed procedure.

 

In principle, observed signal is descrete convolution between IRF and exponential decay in time-domain. And equation of descrete convolution is here,

 

I(t)=∑(L(t'-t shift)×F(t-tj)×Δtj), j=1,.....,t

 

I(t) is intensity of observed signal at the time t (measured), L(t'-t shift) is IRF function (measured), F(t-tj) is original signal that is having parameter I want.

 

In this case F(t) = A*exp(-t/τ), and I want to extract the fitting parameter A and tau. 

 

However, nonlinear curve fit.vi (Levenberg-Marquardt algorithm) only requires model function (reference vi or equation), time t (X), signal I(t) (Y), initial parameters.

 

Because the measured IRF data remains unused, I connected IRF array to data (top of fit.vi). But, it seems to be not right way.

 

So, I can't find the solution to fit convoluted data.

 

Please advise the new user.

 

Thanks.

SIEMENS PLC Interface

$
0
0
How can I interface SIEMENS PLC S7-1500 with LabVIEW over TCP/IP?

DAQmx Start Task Error -201105

$
0
0

Hi,

 

I have a long-runnning system that makes repeated measurements. Occasionally, DAQmx Start Task throws error -201105.The system ran fine for several weeks before this error started showing up. I'd like to know why and how I can avoid it or work around it.

 

The error message that belongs to this code reads:

Resource requested by this task has already been reserved by a different task with conflicting settings. Unreserve any other tasks using this device, or change their settings to be compatible with this task.

 

Can I find out which requested ressource is reserved? There should not be any other task..

 

Some more details: The system consists of three cDAQ 9189 and a cRIO 9047 which controls the others. The cDAQs are equipped with NI 9230, the cRIO with NI 9230 and a NI 9219. There is a separate task for each device but the tasks are set to start at the same (host) time. The cRIO runs an additional continuous task for acquisition from the NI 9219. The repeating measurement looks basically like this:

wait for start time (minus sync time) -> set start time for each task -> start each task -> acquire data -> stop each task -> repeat

 

The error occurs while starting the tasks. When that happens I will: clear tasks, reset cDAQs, unreserve cDAQs, reboot cDAQs and reboot cRIO. After rebooting, the cDAQs will be reserved and the tasks configured as before. Everything works fine again for some intervals.

 

All this runs in its own network so there is no other device that could interfere.

 

Any ideas?

Viewing all 69013 articles
Browse latest View live


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