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

[Robotics] How to setup a robotics project with a GUI

$
0
0

Hello all,

 

I started a thread earlier asking a question about a QMH, but I had more questions, so I thought I'd make a new thread.

 

I have a project that scans a part and measures the thickness and width of the part.  Currently, I have two linear slides, each with a laser rangefinder on it.  The premise is I subtract the rangefinder measurements from the distance between the rangefinders themselves to get the thickness.

 

I'm using a NI USB-6218 DAQ to control/measure the laser rangefinders and watch the length encoder.  The slides are controlled via serial commands.  All of this has to be controlled by a computer that an operator can use to see the thickness of the part and run the scans (as well as see other various digital readouts from the fixture).

 

Right now, I'm using a sort of Queued State Machine (QSM) with all of the components (UI, slide commands, logging, and laser commands) all in one queue.  The serial commands are run in parallel (separate While loop), but everything is run from one VI.

 

Here's where I'm having issues:

Right now, I'm having some issues with the UI locking up because of certain tasks waiting for a certain condition to be met (e.g. "Wait for material to be between sensors")  I also have a "Start Scan" state that queues up a multitude of states to be run that execute the scanning procedure.  This is probably where the UI freeze comes into play.  Because of this major flaw, I started looking into multiple queues for the different components.  Through my research, I came across a Queued Message Handler (QMH).  This is what I'm currently trying to figure out.

 

Here's my question:

My question is, is the QMH the right way to go for this type of project?  This project has to keep the UI clear of "freezing", constantly be pinging the slides for status updates (e.g. position, "In Position", velocity, etc.), logging to a data file when appropriate, and controlling the DAQmx tasks that check the length encoder and the two laser rangefinders.  Can anyone point me in the right direction for a structure to use, or a project that someone has made that uses multiple queues that need to communicate with each other?

 

Thanks!

Joe


Hex String to Remote TCPIP Server

$
0
0

Hi.

I am in the final stages of a project. The aim is to take a GPRMC ASCII string from my GPS enabled radio, convert it to HEX and send to my remote GPS tracking server.

The remote server is from a third party and only accepts HEX. I am new to LabView but have successfully got to the stage of converting the string to HEX. Please find below an example

 

HEX:

32302C3031303930373030303030302C31332C30322C31382C31362E3831363636372C39362E3136363636372C313330362C532C002A32380D0A0D0A

 

ASCII:

20,010907000000,13,02,18,16.816667,96.166667,1306,S,28

 

I have spent the last few days trawling the internet and support forums but have not been able to find (and not sure if its possible) how to send the HEX over a TCPIP: PORT  connection. If anyone could kindly point me in the right direction while I still have hair left it would be greatly appreciated.

 

Regards

Dave

 

What information is stored/pulled from a buffer

$
0
0

Hi I have created a VI which reads and writes data continuously from multiple channels. I have used DAQ mx timing and DAQ mx read with analog, 1D, waveform, N samples, N channels. I know that the sample rate determines how many samples will be taken per second (eg: 1000Hz = 1000 samples per second). I know that the number of samples per channel is the number of samples that will be pulled from a buffer each iteration and determines your buffer size.

 

Questions below refer to 1000Hz sample rate and 100 samples per channel.

My question is how exactly does the data get pulled and stored from the buffer?

If 100 samples out of 1000 taken in a second are stored in a buffer, is it the first 100 samples that are stored or is it random?

After the 100 samples are stored is the output from the buffer an average of the 100 samples taken or is the output 100 different samples of data and in what order?

 

Thanks for any help!

Running Average of Random numbers

$
0
0

Hi,

I need to design a program that displays a random number between 0 and 1 once every second. Then it will compute and display the average of the last four random numbers generated. Display the average only after four numbers have been generated; otherwise display a 0.  Each time the random number exceeds 0.5, let a LED turn on. 
Please help me. Or a flowchart of things i need to follow would be really appreciated
this is what i did so far and its not right Smiley Sad

 

Reading string from Galil onMessage Reg Event Callback

$
0
0

Hi,

I need to get the output string of an onMessage callback from Galil and I have been following the guide below:

http://www.galilmc.com/news/software/using-labview-galiltools-communication-library

So far, I have managed to get the messages working after i substituted the program to be uploaded via Galil with my own .dmc program and the MG commands display the messages perfectly on the String indicator. What I actually need is to get the String that is to be displayed and pass it as a string input somewhere else instead. 

I have tried using a property node, global variables and a type cast from the thread below but nothing seems to be working so far.

https://lavag.org/topic/4559-how-to-get-reference-to-text-of-stringconstant/

Apparent Real-Time Application Crash on "Error 11"

$
0
0

I'm developing a "continuous monitor" based on a IC-3120 Controller and a NI 9147 cRIO Expansion Chassis. The controller manages aqcuisition of data from the expansion chassis FPGA by FIFOs. There seems to be no problems with the about 400kS/s aggregate sampling from the expansion chassis, or the analysis of it. It stabilizes on about 16% RAM usage.

 

But the system routinely crashes after about 9000 seconds of use (2,5 ish hours). The crash is normally preceeded by an "error code 11" in my error log, and usually pops up in a state of my file IO module which writes timer and counter data to an ini file (operation time, number of different events etc.). The ini file is updated by a subVI that receives a path, then opens the file, writes to an arbitrary number of keys in a for loop with shift registers, and closes the file after the for loop has finished.

 

I notice that some of my searches imply that error code 11 could also be related to TCP connections. I do not use any myself, but am unsure of what the controller does "natively" to control the expansion chassis?

 

Has anyone else encountered this problem and solved it?

Issue with accessing 32 Bit DLL in 64 Bit LabvIEW

$
0
0

Hi All,

 

I am working on image sensor testing.

Here we will grab the image and send the image path for post processing, post processing will be done by the Vis which calls 32 bit DLL.

we are using 64 bit LabVIEW.

 

Problem Statement:

 

We have to call 32 bit application from the 64 bit LabVIEW in the same computer, I have got the suggestion saying if we use shared variable it is achievable but its over the network from different computer but i want use in the same computer. 

 

The test flow will be like

 

Power up the device using 64 bit LV

Run Pattern using 64 bit LV

Grab image using 64 bit LV

Call and 32 bit LV and send image paths

Get post processed data from the 32 bit LabVIEW and publish using 64 bit LV

 

Please suggest me how we can achieve it?

 

Best Regards

Manasa M

web-server: POST + GET for one vi

$
0
0

Is it possible to do ONE vi for both GET/POST methods?
I have index.html where the user can click the button. And the web page generates a POST request for the server. The ../get_form page opens.
Also, the user can save a shortcut for the page ../get_form. This will be a GET request (with empty form fields).
So, I need both GET / POST methods for one page.
Is it possible?
Now I made two VIs with the same subVI, but I need to fix url-mapping manually

 

Безымянный.png


Data acquisition using NI cDAQ 9191

$
0
0

Hi All, I am collecting signals using NI cDAQ-9191, that are transmitted to PC using module 9205. I made a custom made program in LabVIEW 14 to save the data.

Terminal configuration is "Differential", data acquisition mode is "continuous", samples to read is 100, sampling rate is 1kHz. Attached is the program.

When I try to save the data for "n" seconds, i got "n x 10" files, each file contain 100 samples only. (If I change the samples to read to 200, i will get "n x 5" files). Why this is so? Is it the limitation of hardware?

Further, when I used chart to display data, it stores 100 samples and then display them, then next 100 and show them. Does cDAQ-9191 transmits 100 samples at a time (100 is samples to read)

if possible, kindly give reference to some white paper or manual from NI.

Auto-update Time indicator with two while loops in parallel

$
0
0

I'm currently trying to implement a current time indicator to the front panel, however, I can't get the time indicator to constantly update in the while loop due to another while loop running in parallel. 

 

One while loop holds an event case structure that is tied to the controls on the front panel. While the other loops holds the current time indicator. I can't get both to work simultaneously together. Here are the things that I've tried so far:

 

1) I changed my mechanical actions from latch to switch to get the two parallel loops to stop at the same time by using a local variables, but by switching my mechanical actions from latch to switch made my other VI's to stop working as it's not detecting the change in the controls.

2). I tried putting my while loop with the time indicator in the same while loop holding my event case, but of course, the time is not updating itself.

 

Is there a way to implement this?

Exporting waveform data to excel

$
0
0

I am trying to export waveform data to an excel sheet.After exporting, under the time plot I am getting values in the multiples of 8 as it can be seen in the screenshot that I have attached. Is there anyway, can I get the time plot values on a linear scale (i.e, 1,2,3,4,5........).Your help is much appreciated.

5-data average Mean PtByPt works

$
0
0

I have a 1-D array of 500 numbers. I would like to use average of 5 data points. I found an example of Mean PtByPt in a loop. But nothing is connected to "i" and "N" inside the loop. Does the vi take care of "i" and "N" based on user input (500 elements and 5-data average)? How many elements are there in the output array? Thank you.

Unable store data in table in continuous loop

$
0
0

Hi,

I Tried to store data in the table whenever the boolean is true and values are changing. The value to be stored is final iteration value of for loop. consider,  while loop condition will always be false. Because this is not the actual case. This one is simplied to understand.  In actual case, The while loop will continuously run to check plc coil status for every 500 ms and executes operation. The stop condition is used by the operator only at the end of the working shift

 

The VI is attached. Kindly support me. 

Install a VISA generated INF with App Builder in WIN 10

$
0
0

I generated an INF driver for my USB device using the NI-VISA Driver Wizard (LV 2015SP1 and Win 10) and I was able to sign it with my personal certificate. If I right-click on the INF file and select the Install command in the popup menu, the driver install correctly without any problems. Also, if I use the command:

infdefaultinstall.exe d:\aa\ut-one.inf

in the command prompt, it installs correctly.

 

Now I am trying to include this operation in the Application Installer, so that the installer would install the application first and then automatically install the INF driver (instead of the user manually installing it), but I just can't make it work. I tried executing the above command with System Exec in a VI, and also running a command from a batch file, but I get the Install Error: "The INF file you've selected does not support this method of installation. Operation not allowed in WOW64"

Can anybody indicate me the correct procedure to do this from the installer generated in the Application Builder?

Valentin

NI LabVIEW Multicore Analysis and Sparse Matrix Toolkit for LV2012 link

$
0
0

I still run LV2012 and want to install the NI LabVIEW Multicore Analysis and Sparse Matrix Toolkit.

Tried the VIPM link, but only 2014 version available Smiley Sad

Is this packed on the FD DVD  distributions ?

DL link?


Malleable VI to parse generic message clusters (string+variant)

$
0
0

I often use the usual approach to broadcast messages: a cluster with a string and a variant. Even if not really required, I still make these clusters into type defined controls to preserve the naming, which can be handy if we want to change names at once (like when names are important at User Events, etc.).

 

So when a certain code part/ module gets a message, it needs to parse out the string and the data, then convert the variant into the expected data type (I know OOP approach is much better since you can do the data type conversion in compile time instead of runtime, but this is not the question now).

To save the valuable BD space, I like to wrap up often repeated steps into subVIs. I thought using a malleable VI (.vim) could be practical here. See the snippets below. 

 

Actually I did not know a feature of vims: even if I connect a typdef cluster to the general cluster input of my vim, it adapts to it without coercion dot.

Besides, I would like to ask, what is your opinion about such approach? Is this a proper way to parse these generic typdef message clusters (I have multiple such typedefs throughout my project libraries)?

 

VIM:

 

Communications.lvlib_Message_cluster_parsing_BD.png

 

parseexample.png

 

edit:

This is a bit better, since often a message consists of a single string without data:

 

vim2.png

 

 

Using NI 9232 vibration module and cDAQ NI 9147

$
0
0

Are there any examples of how to use the NI 9232 module to measure acceleration with an IEPE accelerometer (PCB 339a30)? I have the "IEPE - Continuous Input.vi" shipping example, but I don't see the option to change AC/DC coupling.

LV 2016 frustrations regarding memory use and Autogrow feature

$
0
0

I have been using Labview for 10+ years and upgraded to new releases each year. In the beginning I stuck with 8.6 for quite some time, as I wasn't too impressed with the following releases (2009-10), but at some point you need to upgrade, so from 2012 onwards, I chose to upgrade as new versions came out. Every new release has added new functionality, which I must admit, I'm not the best to take full advantage of. So unfortunately my experience with newer versions have mainly been more negative than positive. Esp 2015/2016 I've experienced a large increase in VI size and memory allocation for a large application I've been working on last years. It handles and plots rather large datasets (0.5-1 mill points), but with 2016 it allocates 1.3Gb before datasets are loaded and it soon runs out of memory at 3Gb+. When I run executables from 2013 it allocates far less memory than 2016. This is not because of bad programming as I have always been careful to initalize arrays and other tricks to save memory, so it is clear (to me) that 2016 is more "sloppy" with memory allocation than earlier versions. As it is I seriously consider to reinstall 2013 to see if this works better for my application. In the long run this is not a good solution, so I would like some views about from others with same experience, and if there are some tricks to improve memory use. I have not upgraded to 2017 because I see a negative trend on performance. Labview has never been ideal on large data sets, and it seems like LV has gone the wrong direction regarding memory use, for unknown reason (data integrity?)

 

One other thing that drives me crazy is this Autogrow feature, that makes my Block diagram grow out of proportions. I use a Prod/Consumer framework, and the Case- structure keeps growing as new cases are added. I have deselected Autogrow on every frame border (loops, cases), and in Options too, but it still grows. The worst part is that it moves around controls, indicators and constants relative to functions,  so wiring looks horrible. For a large app it is very time consuming to manually rearrange wires etc, which I did once, but now it keeps messing up again. To me this looks like a bug. Any suggestions on how to sort this out?    

Labview 5.0 VI errors

$
0
0

Hello, I am attempting to resurrect a test PC that is using Labview 5.0. 

 

I do not have source code or a block diagram for the VIs that are being used.  I have been advised by NI support that means it cannot be brought  into a more current version of Labview. 

 

The hardware is  a NI Lab-PC-1200 Series running Windows 98. The original drive crashed and I have replaced the drive and restored the copy of Labview 5 from the server and the custom VI files  and associated libraries that are used. 

 

When I attempt to open the VI for the test routine I get the following error: 

Error 7 Occurred at Open File+.vi

Possible reasons: 
Labview: File not found.
Or
NI-488 Non-existent board.

Continue Stop

If I choose Continue, the entire application quits. If I choose Stop, the front
panel opens but the buttons and functions don’t work and when I close the file, it ask if I want to save changes to VIs open  in memory. If I choose yes to all, the next time the VI is opened the Labview program starts to open then exits. 

I opened the library file and the Open File+.vi is in the library and it allows me to open the Open File+.vi, and the other VIs in the library are there as well. I have verified the path in preferences is correct.

 

I have attempted a mass compile with no change in the results.

 

I have created a new library, copied all the VIs in it, and put that in the path for Labview, and it will still generate an error: it will open then ask if I want to save changes. If save is chosen, Labview appears to save changes then closes. Next time the VI is opened, Labview exits. If changes aren't saved, Labview exits. 

 

I would sincerely appreciate suggestions or recommendations.

Mouse pad with all short cut keys, quick drop.

$
0
0

Hello All

 

From where I can get the mousepad with all the short cut keys, quick drop.

 

I have seen this mouse pad in one of the presentation given by Darren.

 

Hemant 

Viewing all 66732 articles
Browse latest View live


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