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

Timed loop faster than expected?

$
0
0

Dear all,

 

I'm trying to send RS232 commands periodically.

I saw that timed loop can help me to do the job.

Then, I created a simple example to test and learn how to use it.

I put the example here. It consists on a timed loop with n itérations and a supplementary for loop with m itérations.

I set the timing to one second. Then, I expect a total time of execution of 20s but when I run the VI, it takes 19s.

I thought that I forgot an iteration but it seems not.

Could you help me please?

Finally, do you have clear examples on the use of timed loop to share ?

I found that it is possible also to start the loop with a DAQmx trigger but this is not obviously explained in the tutorials.

Best regards.TimedLoop1.png

TimedLoop.png


How to use the "Selection Color" property of a Listbox for each active row

$
0
0

Hi all!

In the attached image you can see the "SelColor" property under "ActiveCell" but the color of the selection changes for every single row.

I was wondering if it's possibile to use the "Selection Color" property of a Multicolumn Listbox for the current active row only.

 

image.png

 

This is an alarms' listbox, I'd like to keep the red color for alarms' selections and the yellow color the warnings' selections.

 

This is the right selection (red selection for the alarm)...This is the right selection (red selection for the alarm)...

 

... And this is the bad one (red selection for the warning instead of yellow selection)... And this is the bad one (red selection for the warning instead of yellow selection)

 

 

Thank you!

Plotting 2D array

$
0
0

I'm trying to plot a 2D array being read from a csv file using the read spreadsheet vi. So far I've tried everything in other posts that I've found and nothing shows up on the graph. 

 

I'm currently trying to get it to work on an XY graph. 

I'll attach the csv file I'm trying to use its just two columns of data. It will always be two columns but unlimited on rows as data accumulates over time. 

It's extracted from a log and I'm trying to give a visual representation of the filtered data to the user. My other choice is using matplotlib with python but I'd like to keep it in LabVIEW as it is more aesthetically pleasing and easier to view the data.  

I-V measurement via Keithley 6220 and 2182A

$
0
0

Hi,
I am attempting to perform a basic I-V sweep in the combination of Keithley 6220 and 2182A, but always got an error of “Input buffer overrun error -363” at data transfer process in my labview codes.

I believe these two instruments are well-connected, with RS232 null modem cable, trigger link and PC remote control on 6220 via GPIB. Besides, the RS232 setting of 2182A is baud rate of 19.2 k with no flow control. These configurations allow me to perform the basic operation of DC Sweep (up to 1024 data points) in KI6200.exe provided by Tektronix, indicating I certainly make some mistakes in my labview codes.

To simplify the problem, I turn to store some data points in the buffer of 2181A, as the following operation on the front panel of 2182A .
# Press “Store”->Set buffer size “50”-> Press “Enter”
I could get these data points remotely by sending the below comments:
# :SYST:COMM:SER:SEND " :TRAC:DATA? "
and then loop the below comments until the 50 data points are all read to PC.
# :SYST:COMM:SER:SEND "ENT?"
# VISA read 255 bytes

However, in the case that the stored data in 2182A buffer are greater than “75” data points, Keithley 6220 will got “Input buffer overrun error -363” immediately as I send the first command:
# :SYST:COMM:SER:SEND " :TRAC:DATA? "

I don’t know what happens. It seems that the serial port buffer of Keithley 6220 is too small to receive the large data sent from Keithley 2182A. Does anyone know how to set Keithley 6220's VISA  I/O buffer size?

 

I have also tried to turn on the RS232 flow control (XonXoff) of 2182A  but the error keeps popping.

 

I really want to perform the I-V measurement via Keithley 6220 and 2182A.
Any suggestion will be greatly appreciated!

getting data port for GigE Vision camera

$
0
0

Hello,

 

I am using a GigE camera, and it can be controlled in the eBUS Player (software from the vendor). Now I would like to control it in LabVIEW. For my particular application, I need to get the data port and local IP address of the video stream. Please see more information in the attached pic. Those parameters are under Image Stream Control. Anyone know how I can get those information in LabVIEW?

 

imageStreamControl.PNG

Thanks,

Bin

Constrained Non-linear Fit do not opimalize if bounds array is connected

$
0
0

I try to fit gauss function with Constrained Non-linear Fit, I get different results with or without set bounds.

When i set bounds, then the fit is not optimalize and the result parameters are same as the initial parameters.

If the bounds array is not conected then the fit get optimalized. Strange fatc is that, the best fit parameters are in between the bounds.

I do not understand why i dont recieve same result in both cases (best fit parameters are not found when bounds are conected).

Please can someone explain this behiavor and how to fix setting to get optimal result even with bounds connected.

 

 

Front panelFront panel 

Block Diagram.png

LabView Vibraction

$
0
0

Hej

Muszę zbudować program, który będzie badał wibracje wirnika. Nie jestem jednak pewien, czy to, co udało mi się zbudować, jest całkowicie poprawne. Chodzi mi przede wszystkim o to, że muszę dodać formułę dzielącą sygnał od DAQ przez 0,00995. Jest to pokazane na załączonym obrazku, ale nie wiem, gdzie muszę wysłać, aby sygnał był prawidłowy.
Ponadto muszę przedstawić sygnał na wykresie widma gęstości mocy w postaci „piku” na osi x, aby uzyskać częstotliwość, podczas gdy na osi y g / g (obciążenie wibracyjne) ma zostać znalezione i mam problem też z tym. Czy ktoś może zasugerować, jak rozwiązać ten problem.

LabView 4.PNG

LabView 2.PNG

LabView 3.PNG

   

Look up table issue in FPGA

$
0
0

Hi everyone,

 

I'm trying to program a SPWM with variable frequency using look up tables. I use a NI9112, NI9014 and NI9474. Some times (50/50 of the time), when i modify the frequency for some reason the output gets stop and i have to stop the VI to apply the changes. As i use this VI to control an 2 level inverter, is critical to hold the switching working to avoid damage to the converter. 

 

Basically i use look up tables to create sine and triangular signals on FPGA, the compared and routed to digital output in 9474. The frequency is modified resamplig the clock ticks.

 

Someone can help me how to avoid the issue with the stops? I'm not understand entirely how the FPGA interacts with host VI and 9474, and then, how to sync it.

 

Thanks in advance.


Scale Frequency & Amplitude by Time

$
0
0

I am attempting to simulate the starting of an engine in reference to a magnetic ignition sensor. I am trying to actively change the sine wave generator VI's amplitude and frequency by some type of counter where after 1 ms it is running at 1Hz and 1V where after the next  ms its 2 and then 4 and so on until it reaches the 60Hz of speed. I cannot seem to figure out how to initialize the start and then double it on itself. If I were working in Java or C it would be easy just by making a variable however I'm not sure how to do this in LabVIEW as I am quite a beginner. I am just trying to get it working in software first then eventually I can trick a real ecu to thinking its starting. I have a cRIO harware and some analog outputs and digital I/Os. The VI I just created is essentially useless. Is there some type of example I can use somewhere of this happening?

plotting a data from LVM file

$
0
0

hello,

 

i am a student learning how to use labview in my project, my project is based on receiving analog data from arduino then plot it and save it for plotting it again sometime, i used "write to measurement file" vi to save the data as a lvm.file but when i try to plot it again in waveforme chart using " read from measurement file" nothing appears although i chose the correct lvm.file
i would like some help in this problem because im just beginner in labview and i don't have any other ideas .

Thanks in advance

othman nchifa

Robotics environment simulator

$
0
0

Recently, I am working on generating a robotics environment simulator with some industrial robotic arms and custom positioner with multi-DOFs. After reviewing some examples regarding the robotics simulator in LabVIEW. I find most examples, like SCARA Arm, Puma560 Simulator, and so on, have the "XML" file as the input in "Manifest filename". I am wondering what software has been used to generate those XMLs which include all hardware information. Also, In most examples, they are using some VIs with the title " Hitec HS400 series", what is it? Where can I download that library? Looking forward to hearing from someone who is familiar with the robotics environment simulator. I appreciate your great help.

Help with Multi Channel sampling on NXG

$
0
0

Just started using labview NXG a few weeks ago. I have an NI9211 thermocouple card. I wrote up a program to control a heater using the thermocouple and PID control. Everything works great.

When I tried to create another task for a second thermocouple wired to the NI9211 I got errors saying the 50103 "the resource is reserved" or "samples must be > 0.

I see now that I can add the second thermocouple to the original task, but then I have to split the two data streams anyway, as they are being used separately, in different loops.

Taking the training courses, it says you can add multiple channels to a single task, but not if they have different timing rates. This makes it seem that splitting them into different tasks should work, and combining is optional.

Can anyone explain why I can't create a second task for the second thermocouple? Is it a limitation of the NI9211 card? I still haven't figured how to split the data out of the single task either.

Labview interface with Arduino using Serial port 1

$
0
0

Hello All,

 

Im trying to communicate with Arduino from Labview VISA. Is it possible to select hardware port such as Serial1, Serial2 etc other than Serial0 in VISA. As Labview LINX provides such options for selecting UART channel. If it is possible please help me how to do in VISA.

 

Thanks in advance:)

Vibractions

$
0
0

Hi

I need to build a program that will study rotor vibration. However, I am not sure if what can be built for me is completely correct. My main point is that I have to add a formula dividing the signal from DAQ by 0.00995. This is shown in the attached picture, but I don't know where to send it to make the signal match
In addition, I need to give a signal on the power spectrum spectrum as a "peak" on the x axis to get the frequency, while on the y g / g axis (vibration load) can be found and I have a problem with that too. Can anyone suggest how to solve this problem.

LabView 4.PNG

LabView 2.PNG

LabView 3.PNG

   

sBRIO 9628

$
0
0

Hi,

I am using sbRIO 9628 , and i want to use the real time host i am not using any PC can anyone help me .


Need to understand a part of code

TCP/IP Connection: Labview & Simulink Communicate Problem

$
0
0

This is my TCP Client.

TCP Client Communitcate Data for LABVIEW.PNG

This is my Simulink TCP Server.

TCP Server Communitcate Data for Simulink.PNG

This is my Stream Output Setting.

TCP Protocol[1000].PNGTCP Protocol[1000] Board Setup.PNG

This is my Stream Input Setting.

TCP Protocol[1500].PNGTCP Protocol[1500] Board Setup.PNG

I can send data from Simulink which the data type is double to Labview which the data type is String ,but My problem is that I can't Receive data from Labview which the data type is String to Simulink which the data type is double.

 

Please heip me.

Finding BPM with peak detector and Index Array

$
0
0

Hello everyone! I posted a few days ago with some trouble reading a LVM file using the Build Waveform function. The LVM file is an ECG and I have, using a peak detector, use the RR interval of the first 6 waves and calculate the beats per minute also using the Index Array function. I'm having trouble connecting everything and was hoping you guys could help out. The components I need to wire are attached.

LabVIEW NXG WebVI's accessing the query string in its URL

$
0
0

Is there a simple way within LabVIEW NXG 5.0 WebVIs to access the query string at the end of the webVI URL when it's running?

 

 

Example:

A webVI is running at this address: http://localhost/testURL/index.html 

Depending on what data I want to see I make the calls to the webVI like this:

http://localhost/testURL/index.html?test1

 

How can I read in "test1" into the webVI so I can use it to make decisions on the web page?

I like to use it to be able to run the same WebVI but show different data depending on the query string

3D Plot image arrays as a volume/z-stack

$
0
0

Hello,

I'm want to plot multiple 2D arrays, each representing an image, as a volume / z-stack.

I tried using the 3D plot functions provided, but I couldn't manage to figure out the input arrays they need. Is this even possible in LabView?

Thanks

Viewing all 69641 articles
Browse latest View live


Latest Images

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