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

RLS encoder slow down while loop execution

$
0
0

Hello everyone,

 I have an absolute encoder RLS with E201 USB encoder interface, it uses Biss protocol, 24 bits.

From the small software that the company provided the position can be read very fast but when I try to read the data in Labview the While loop execution getting

slower than normal and shows the counts with a delay of 3 to 4 seconds. The code is simple and just has the I/O for Write and Read. Would you please advise if there is any way to get the data in a real-time or increase the reading response time? 

Thanks in advance

ENC1.jpg

 


Change the name of the case in the case structure

$
0
0

Hello,

I tryed to change the name of one of my cases with the typ.def but I continue seeing the positions of the cases (0,1,2,3) instead of seeing the names.

This is my program

Activar boton con un string

$
0
0

Hola!

Como puedo hacer para que cuando meta un string cada caracter del string me active su correspondiente boton en un array de booleanos?

Gracias!

Array sequence

$
0
0

Hi,

 

I'm relatively new to Laview and would be open to any advice with a small project which I've assigned myself to experiment with arrays, clusters, etc., At this moment in time, I have an array with data read from a specified file path - the data from this file is in the 2D array which displays the information regarding the sensor values - in the left hand side column the period is displayed with the corresponding sensor value being read in the right hand side column.

 

Now the issue I'm having is that I cant think for the life of me how to get the array to follow the sequence continuously without setting the desired column and row number - I want the program to automatically go through the sequence of period with the sensor value continuously until stopped, for example when the period is 10, it should display this on an indicator with the sensor value in the column next to it. The system should automatically go through the sequence and return back to the first number and continue...

 

If there is any suggestions on how I can get my array to follow the sequence then I would appreciate it a lot. 

 

(The photo shows what I have up to now, I have to manually input the row and column number and cant find any information on how I'm supposed to set this automatically. Thank you.)

Avoiding two while loops

$
0
0

Hi together,

 

I'm trying to fit these two while loops into the programm(see attached vi) now ive got the problem that i need to stop the inner loop to change the input value. Can someone tell me which other ways there are to get where i want to get?

clear a 2d array

$
0
0

Hello everyone,

 

I am generating an array via shift register. My purpose is to add another array(exactly same size with the first one) to this and create a 2d array. 

Like

Minimum Val ;  Data val

       0                         1

       0                         1

 

When i press the record button i write the data so spreadsheet and i erase the first array. How can i erase the last 2d array after each time i pressed record. I dont know why it saves data on that 2d array. How can i erase that array completely. My purpose is, to write data between the last button press and the one before that.

 

Thank you so much! 

deletearray.PNG

Cannot set waveform chart value by reference / property node

$
0
0

I am trying to pass a value from a subVI to my main VI, the indicator is a cluster of a waveform chart (containing two plots) and two numerical fields. The cluster reference is passed to the subVI and I want to write the new values to it via property node. However, the chart does not receive any values, it just remains empty.

 

When I use a cluster indicator locally in the subVI and write to it regularly via terminal, it's working fine. Also, when I use a single waveform chart not inside any cluster I can write to it via reference and property node without problems. Just when the chart is in a cluster and I'm using the cluster reference and property node to pass data to the chart inside it, it won't work.

 

What gives?

Get data from server

$
0
0

Hello,

 

I am a beginner for LabVIEW nxg. I am getting data from the server, and pass my server URL to HTML get and want to plot the body into a graph. Moreover, data from the server are in array string so I converted into an array and try to plot it but still not working. So I already did the same application with LabVIEW but the same logic not working in LabVIEW nxg web app. Could you help me, how to do this or do you have any example which helps me to solve this prob ?.


How to get data from an 'Electronics unit' to LabVIEW with ActiveX ?

$
0
0

Hi,

 

I have to make an automatisation of a surface tension measure. I'll explain better after this list of what I have to make this work :

-LabVIEW

-A Kibron G2 (measures the surface tension)

-An 'Electronics unit' (bring together the data from the different sensors/motors)

-The software 'DeltaGraphX 3.56' which is sold with the Kibron G2

 

the Kibron G2image.png

the Electronics unitimage.png

 
 
 
 

Right now I'm able to get the tension corresponding to the surface tension only in the DeltaGraphX software like below.

image.png So I would like these data to appear in indicators in my LabVIEW VI.

 

I need to bring this data into LabVIEW with the help of ActiveX but I'm only getting errors in the indicators like '-7' or '-9' as below.

-9.png

I do not have any indication on what -9 or -7 or 0 could mean...

 

Don't hesitate to ask questions if I wans't clear enough.

 

Thanks,

Loïc

 

FFT Power Spectrum

$
0
0

I have a magnetoresistive sensor with two Wheastone bridges conected to my cRIO 9040, thie sensor is powered by 1.25VDC, I have the output voltage values ​​of each bridge, what I wanted to do was the FFT Power Spectrum of each bridge so as to detect slight variations when approaching a small magnet. But not appears anything.

 

I attached my VI.

MyRio Program

$
0
0

Hello everybody!

I'm starting my lessons at LabVIEW for Robotics use, i'm looking into use Optical and Ultrasonic sensors, like :Optical Sensor Sharp , LSB, and Ultrasonic Ping, using Custom MyRIO program.

About the way that the sensor work, could anyone give me a explanation or even an example of the way can use them to guide the robot with the Encoders of the vcc Motor, align with walls, and use the LSB to align with Black tapes?

Thank you!

Debug C dll: symbols not loaded

$
0
0

I have written a DLL in C in Visual Studio, meant to run under LabVIEW using Call Library Function Node. I tried to set breakpoints and debug it using Attach Process. This worked once, and then never again. The breakpoints show as hollow circles annotated with the message, "The breakpoint will not be hit. No symbols have been loaded for this document."

I have tried several things mentioned in this post:

1. I verified that the DLL is built in the Debug configuration.
2.The .pdb file is in the same directory right beside the DLL, with the same build date.
3. I turned off "Enable just my code" in the debugger options.

4. I cleaned and rebuilt my project.
5. I run the VI that calls my DLL, and it calls a trivial function in the DLL to get it loaded, then goes into a user-interface wait state. Then I attach to process.

 

At this point previous instructions will tell me to find my DLL in the Modules list. IT ISN'T THERE. Ever. Even though in my VI's front panel I see output which had to come from a function in the DLL, so it must have loaded.

 

Where do I go from here? Any ideas?

 


C and Labview code attached. Instructions:
1. If you need to rebuild the DLL, open the solution and build the FIRST project. Otherwise, the DLL is in the Debug folder.
2. Run Read1String.vi. You should see "message" fill with the words "Hello LabVIEW", which come from the trivial starter function in the DLL.
3. Attach to process, attach LabVIEW.exe
4. Set a breakpoint in the MakeFakeStrings function.
5. Press the Start button on the VI front panel and see if you actually hit the breakpoint.

 

LabVIEW 2017
Visual Studio Community 2017 version 15.9.6
C programming language (not C++)

DAQmx interferes with keyboard and mouse in Windows 10

$
0
0

So here is a a really strange one.

 

I have a LabVIEW program in LV 2017 SP1 that runs perfectly well on Windows 7 PCs.

Now the customer has installed it in a new system running Windows 10 and attached the USB keyboard and mouse through a KVM which seems to have an integrated USB hub, i.e. USB keyboard and USB mouse into KVM, one USB cable to each of the PCs.

 

Keyboard and mouse work flawlessly on the PC in question until my software is started. Then the mouse intermittently hangs/lags and the keyboard intermittently becomes sticky. Intermittently is in the 5 to 10 second range for about 1 second.

 

If the software is switched into simulation mode the keyboard and mouse work just fine.

 

The only other USB device on the PC is an cDAQ-9174 chassis with a 9215 and a 9211 module.

As soon as communication with that device is started the interference starts.

 

When the mouse and keyboard are plugged into the PC directly the interference stops.

When the mouse and keyboard are plugged into the PC through a different USB hub the interference is back.

 

We update the drivers to 19.5 without any change.

 

Does anyone have any idea what else to try? 

I am currently building the software in LV 2019 SP1.

Automating mass flow controller

$
0
0

Hello everyone!

I am very new to LabView and i am trying to build a VI for controlling two mass flow controllers. I will try to explain my problem as clear as I can to avoid doubts.

I want the mass flow controllers to operate in two different states, for example: 

During 2 hours passing a pre-determined mass flow (State 1) and then, for 1 hour,  pass a different pre-determined mass flow (State 2). The idea is to perform this in a loop (S1, S2, S1, S2 and so on)  until i want to stop the experiment. 

Since I know very little of LabView programming, I am having difficulties programming this loop. 

The possible solutions i tried to implement mainly comprised of using while loops or case structures but i am having difficulties counting the time and changing between S1 and S2 at the end of the target period. I tried using Elapsed Time but I could not put it to work. How can i built a VI for this automatic control of the mass flow controllers? 

Thanks in advance for the help

 

Best regards, 

NI LabView license key

$
0
0

Hi, NI LabView license key based in Microsoft Windows OS would can use in Linux OS or need to purchase license key for Linux OS?


Access violation when registering for DAQmx Event with empty Task input

$
0
0

I am writing a small DAQmx routine that needs to be toggleable on and off by the user. I'm using user events to talk to the loop, so I'm planning on using DAQmx events to pull data from the buffer when it has enough data in it.

 

When I start the VI, I register for an event of Every N Sample Acquired into Buffer. Since there's no task at this point, I use an empty task constant. In my "Start acquiring" message, I generate the task with the right channel info, then replace the Event Registration with the correct one, so it should fire when it's ready.

 

Unfortunately, my initial Register for Events function is throwing an Access Violation. I've attached the minimum code needed to get this to run.

 

accessviolation.png

 

I tried this same code on LV2016 32 bit and LV2018 32 bit, same problem.

 

I'm running DAQmx version 19.5, which appears to be the latest one.

 

Can anyone run this snippet and let me know if it works for them? If this method of event registration doesn't work the way I think it does I can work around it, but to hard-crash LabVIEW makes it feel more like a bug than anything else. I'll try forcing DAQmx to reinstall, but I'm hoping someone can try this on a separate system and see if it crashes there too.

 

Thanks for any help and hope you guys had a good Thanksgiving 🙂

labview-arduino PWM

$
0
0

Hello All, happy thanksgiving.

 

I am trying to control a small DC motor using arduino uno, labview with L298N H-bridge board.

 

This is the DC motor: (https://www.amazon.com/Topoox-15000-16500RPM-Electric-Science-Experiments/dp/B073Q2Y3RC/ref=asc_df_B073Q2Y3RC/?tag=hyprod-20&linkCode=df0&hvadid=241888066999&hvpos=1o1&hvnetw=g&hvrand=9852685961965395719&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9060286&hvtargid=aud-801738734305:pla-447885543765&psc=1)

 

This is L298N board: https://www.amazon.com/Stepper-Driver-H-bridge-Controller-Arduino/dp/B07SGX6YR7/ref=asc_df_B07SGX6YR7/?tag=hyprod-20&linkCode=df0&hvadid=344005018279&hvpos=1o2&hvnetw=g&hvrand=1547417667790203787&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9060286&hvtargid=aud-801738734305:pla-826232417167&psc=1&tag=&ref=&adgrpid=69357499415&hvpone=&hvptwo=&hvadid=344005018279&hvpos=1o2&hvnetw=g&hvrand=1547417667790203787&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9060286&hvtargid=aud-801738734305:pla-826232417167

 

There are alot of tutorials online and I followed their instructions exactly but I think the problem is that I am not getting PWM output (I tried both the Linx VI and Arduino VI). I confirmed that arduino and L298N are powered because of the green led light. also labview is talking to arduino because "RX" led is blinking green. 

 

This is the tutorial I followed: https://www.youtube.com/watch?v=uMkRuFQsd84

 

What I have tried:

1. I jumped the ENA pin on the H-bridge and I was able to get the motor to move, but when I connect ENA pin to one of the PWM pin on arduino, it doesnt work.

2. When I try to measure PWM output pin (#9 in this case) with oscilloscope, (red to the #9, black to arduino ground), I am not getting any signal, just some sine wave noise.

3. I attached the motor to oscilloscope and fed it PWM signals, I can hear the motor whining between above 500 hz at any duty cycle.

4. I have tried multiple L298N. 

 

Please see attached labview VI.  

 

If anyone have any ideas or experienced this as well please let me know!

 

Thank you!

Code running after while loop finishes

$
0
0

Hi all, I'm pretty new to Labview, we've been learning it in my freshman engineering class to be able to code the Lego Mindstorm EV3 robot. I'm currently trying to have a portion of code execute after the while loop finishes but the part of the code just executes the second I start it. How do I avoid this? The while loop stops on condition that the robot gets within 10 cm and then I want the next portion to execute which will power the secondary motor. Just whenever I start it, the secondary motor goes first and then doesnt execute the while loop at all. Thank you.

how draw a rectangle area in the signal wavefrom

$
0
0
Dear all, I use the DAQ card to acquire a analog signal, this is a riseing wavefrom from 0 to someone voltage value, but I only want to check someone rectangle area signal value, so I want to draw a rectangle are in th waveform, use to show I will check signal in this area, how can I draw it in the labview? Best Regards, thank you.

Disabling an element of an array of a control?

$
0
0

I'm not that good at Labview, so this may seem like a basic question... I'm not sure if "disabling" is a proper term, but I am trying to disable/ignore some element of the array. On the picture, the last row is greyed out to indicate that the values are not being used. If I type in a 0, it will actually set the current as zero instead of not running it at that value. I tried to right click a single element, went to Advanced -> Enabled State and selected Disabled and greyed out, but the whole array gets greyed out instead. I remember being shown how to do this before, and it seemed to be something simple (it did involve right clicking and selecting on an option), but I have seemed to forget how to do this... so far I wrote NaN but it would be nice to actually disable the element.

Viewing all 69513 articles
Browse latest View live


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