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

Send G-Code to Arduino Mega (Marlin 1.1.0-RC7)

$
0
0

Hello to all Programmers,

I am currently writing on my Bachelor Thesis and I need to send g-code (generated in LabView) from Labview to an Arduino Mega (of a 3D-Printer), where Marlin 1.1.0-RC7 is running.

Usually the g-code is sent from RepetierHost via Serial Connection to the Arduino (which works perfectly), now I want to do it from LabView directly.

I have installed the VISA Library for Labview and when I send through the serial Connection a g-code (M42 P57 S255 meaning: turn on Pin 57) I only get Information as for the Printer set up, but it is not answering my command, meaning the pin is not going on, even though through RepetierHost it is (-->pic Visa Test).

Then a lecturer advised me to add a carriage return, an empty string or a \n (next line) after my command. There came the same Printer-Infos, but when I put the carriage return in front of the command, there was showing:

echo: Unknown command: ""

ok

 

above the same usual lines that were showing in the tests before (-->pic/vi Visa Test 2):

start

echo: External Reset

Marlin 1.1.0-RC7

echo: Last Uploaded…

 

and no Pin is lit.

Are there maybe other elements I have to put before or after my command?

 

I would be extremely thankful, if you could give me some advice.

Best regards,

Lea


"General polynomial fit" VI algorithm documentation

$
0
0

Simply put, I can't find it... Where is the documentation on the algorithm options for the polynomial fit VI? Why is it so hard to find? And if it doesn't exist, why not?

How can I eliminate the time delay pruduced after fitering, and line up with the original signal

$
0
0

I am using DAQ to read voltage change from two pressure transducer, one 0 to 5 bar, other 0 to 50 bar. In block diagram (as first picture 1), I read signal with DAQMAX and show merge the signal to one graphic indicator, the top line of merge signal be added a filter to filter the noisy of 0 to 50bar pressure transducer signal, however after filtering, (picture 2) the 0 to 50 bar data shows the time delay (white line) compare than 0 to 5bar data which is the one without filter(red line), How can I line up the after-filter signal  with the original signal?

 

Re: Arrays

$
0
0

Hi, I am new in this forum so my apologies if I am not posting this question in the proper place.

 

I need to read an array inside a for loop and display the values outside this loop. The .png attached is a simplification of my problem -the code is just a bit more complex... at least for me

 

Why does it work fine with Meter 1 inside the for loop but Meter 2 outside just reads the last values? I checked the tunnel modes. In every other mode I get a broken wire.

 

Sorry for the simplicity of my problem; I know my level is quite low but help is appreciated.

 

Regards

cRio Warning required module, driver, or plugin not installed

$
0
0

Hi, I'm transferring a project from LabVIEW 2012 to LabVIEW 2016(64-bit) on windows 10, with an interface with cRio-9074. I see the following warning on my project explorer:

"Unsupported Item: LabVIEW currently cannot load the selected item. The required module, driver, or plug-in either is not installed or has an expired license. Ask the creator of the item or its project what software it requires. Contact NI for help identifying the software." labview c-rio warning.PNG

 

 In response to this error, I downloaded the version of cRio driver that is compatible with cRIO-9074 for LabVIEW 2016 on windows10 (NICRIO1700.zip), found here: http://www.ni.com/download/ni-rio-17.0/6629/en/. After downloading, I restarted my computer and opened the project back up. I'm continuing to see the same error.

 

My questions are:

(1) Is there any way to see the specific module, driver, or plugin that I am still missing?

(2) Do you have any guesses about what might still be going wrong?

 

Thanks so much for your help!

 

New to Labview having some issues acquiring two signals at once

NI PXI-4060 driver ERROR

$
0
0

Can't get NI max to detect the NI PXI-4060 driver, which is a DMM. I have installed NI-dmm 16.0 and DAQ-MX drivers onto the pc but still no luck. Is there some type of driver I am missing that is specific for the PXI-4060?

 

I attached a picture of the error that NI max gives me about the PXI card.

Passing Command Line/PowerShell Arguments to LabVIEW VI Controls

$
0
0

Hello, 

 

I'm facing a bit of a challenge here. My task is to be able to pass arguments to a LabVIEW executable and have it be recognized in the appropriate format. Using the latest version of Windows and LabVIEW. 

 

I've tried following the guide on the NI website on how to do this. However, there is a problem with this - the arguments always get interpreted as a string array. If, say, I wanted to pass arguments '2' and '2' in order for the .exe to add them and result in '4', I would have to parse the string and convert from a string to an int within the LabVIEW program. This isn't scalable - if I have 50 executables, I'd have to make a subVI to accommodate for each one, as they take in different data types and different numbers of arguments.

 

Because of this, I've tried a different approach. I wrote a PowerShell script that intakes parameters, converts them from a string to an integer, and launches a LabVIEW executable. The challenge I've hit is being able to take there converted arguments and passing them to the LabVIEW .exe. For example, I want to pass '2' to Control X and '2' to Control Y in order for the indicator to result in '4'. So far, I haven't been able to find any way to do this. I would greatly appreciate the help.

 

PowerShell script code below:

#Intaking Arguments
"`n Arguments Entered: `n"

for([int]$i = 0; $i -lt $args.Count; $i++){
    try{
        [int]$parameterAsDecimal = [convert]::ToInt32($args[$i], 10)
        "   $i - $parameterAsDecimal"
    }catch{
        [string]$parameterAsString = $args[$i]
        "   $i - $parameterAsString"
    }
}

"`n Number of arguments passed: $($args.Count)"

#Starting LabVIEW executable
Set-Location C:\Users\[user]\Desktop\LabVIEWProjects\builds\passing_parameters_proj\IntAddition
Start-Process IntAddition.exe

"-------------------------------------------------------------------------------------------------------"
#In Command Prompt, initially, 'cd Desktop\PowerShell_scripts' #Call with 'powershell.exe -file passing_arguments.ps1 [input parameters here]'

Thank you,

 

Sav


Writing and Reading data with Database Connectivity Toolkit and SQL Server

$
0
0

Currently I have a VI that is writing and reading information from a SQL Server (Microsoft SQL Server 2016). If I'm practically writing and

consulting information (comparing if data is written, if not, save new data) from the 4 cursors, which one is the most recommended

to use: dynamic, forward-only, key-set or static.

 

At the moment I compiled the VI using the dynamic cursor in my queries. But I'm getting some weird timeout error (258). So I want to try

changing the cursor, if maybe that could help somehow.

 

Please help me with this matter, I would really appreciate it.

 

In advance; thanks a lot everyone.

HMR2300 Communication with Labview using USB-6001

$
0
0

Hello,

I am trying to configure a HMR2300 Honeywell Magnetometer with Labview . I have tried to establish a connection using NI-VISA however, no readings are displayed on the screen. My second option is establishing a connection with the sensor using a USB-6001 Data Acquisition device. However, I am having trouble connecting both devices together due to them having different terminals. I have attached a picture of the terminals of both devices. Any help would be appreciated.

Thank you

Optimization algorithm for measured signals

$
0
0

Hi,

I'm wondering whether there are any Labview implementations of an efficient optimization algorithm for "real-world" signals (i.e. a control problem rather than a pure math problem). The goal is to automatically adjust a set of physical parameters (e.g. voltages, motor positions or the like), which maximize a measured "objective" signal. An intuitive example would be the alignment of a laser beam through a pinhole using a motorized mirror and the feedback is provided by a photodiode or powermeter behind the pinhole.

 

I thought about using one of the optimization VIs, but I think they would have an inherent problem with an objective function derived from a "real-world" measurement because of the noise and/or drift. Maybe it's possible to control the step size and tolerance to get a reasonable result but I couldn't figure out a robust procedure so far.

 

I'd rather treat it as a control problem with an approach similar to a PID controller but instead of locking the "process variable" to a setpoint on a monotonous curve, it should rather lock it to an extremum (which can drift over time). I'm not very familiar with control algorithms and I don't even know whether it's possible at all. Does anyone know a suitable solution?

Endless loop when trying to use Value (Signaling) Property Node

$
0
0

Hello,

 

I'm trying to get my code to take a picture of my graphs every time a certain value is exceeded. My code works beautifully.... except that it doesn't stop taking pictures and I can't seem to figure out why.

 

Does anyone have any ideas as to what is causing my event structure to continuously loop?

code.PNG

 

 

Creating either/or like statement when user inputs in specific numerica control

$
0
0

Hi guys,

I'm not 100% sure how to word it but I want to control the numeric inputs as so when user is inputting a value into a specific box, the rest would be grey out and be disabled.

Say the user input a value onto the "Desired Flow Total," the rest of the input would be grey out and disabled, allowing just a single value input... not sure if I'm wording this correctly or not.

flow control.png

 

 

Programmatically determining the child class type of a dynamic parent wire

$
0
0

This may be super simple but I feel like I'm missing something. Let's say I have a parent class "Car" with two child classes, "Ford" and "Chevy". In my application, the parent class itself is never used directly; it's always a child class that gets created depending on the user's selections.

 

For most methods, you will either use the parent class method or override it with a child class, and all of the selecting of information is done via dynamic dispatch. However, I have a specific application that will only fundamentally work with one specific child class (let's say Ford). In the initialization/construction of the "Car" object, I want to throw an error if a user tries to instantiate this sub-system with Chevy.

 

My first thought is to simply do an "Is Equal?" on the incoming "Car" class, checking it against a "Ford" constant- but I only want to detect which child class it is, not compare a constant to the newly created child class.

 

My next thought is to attempt a "To More Specific Class" and catch the error that is generated if I try to genericize (is that a word?) a Chevy class into a Ford class. This method works, but seems a bit unintuitive.

 

Last, I could make a method in the parent class that simply returns False unless it's overridden by a child class, and have the Ford class override the function and return True. However, this means I'm making two whole VI's to do a simple type check.

 

Am I overthinking this? Is the best way to attempt a conversion and check an error, or is there a function to compare a parent class to a specific child class?

 

I'm still new to LVOOP so forgive me if this is an obvious question. Thanks for the help.

Labview Arduino Serial Communication

$
0
0

Hi Everyone,

                    I am trying to get arduino to receive a message from labview and then run a function within arduino from this message. I am using the serial event architecture. Arduino function beginFunction() successfully sends a message to labview, but labview does not seem to send a message back. My arduino code is as follows:

 

void loop()
{
if(start==true)
{
beginFunction();
}
if(inputString.equals("move"))
{
moveUntilPos();
}
if(inputString.equals("scan"))
{
scan();
}
}
void serialEvent()
{
while (Serial.available())
{
char inChar = (char)Serial.read();
if (inChar != '\n') {
inputString += inChar;
}
if (inChar == '\n') {
stringComplete = true;
}
}
}

 

my labview file is attached.

 

It does not seem to register the message in arduino, does anyone know why?

 

Thanks,

Sam.


Incremental including the first value being input

$
0
0

Hi, i am trying to get a incremental of 8 from 1 to 201. However in my VI, i can only get values of 9, 17, 25... 201. I do need the values  1 for the output in my VI. Please assist me, much help is appreciated! 

measuring signal to noise ratio using USRP and labview

$
0
0

Hi,

I Have a problem that I Can't  measure the signal to noise ratio  of a signal using USRP 2932 and labview,so I will be grateful for any help from anyone.

thanks alot

Adding for loop into Waveform chart to output portion of data for every 30 seconds until data finishes

$
0
0

 Good day,

 

I have so far created a waveform chart but showing all the datas in one go. I'd like to show it some portion of data for every 30 seconds until all data in the spreadsheet is shown. 

 

Detailed: 

In the spreadsheet file, the first column will be use as a 'plot' to show the data. Meaning that from 0-128 will be shown for 30 seconds, then the next data of 0-128 will continue to show for 30 seconds until data finishes. 

My plan is to use for loop, however failed to do so. 

My aim is to show data interval like this https://www.youtube.com/watch?v=kxWUCADgGbA

 

Your kind assist is appreciated.

Help me fix my calculator

$
0
0

Hi, I recently made a calculator. It works perfectly as far as I'm aware. (it's called Calculator Logic.vi and it's attached below).
My teacher saw it and asked me to add parentheses.
So I started working on a component that breaks down any expression into a number of "parenthesized expressions", and solves every one of them individually. This component is a key step in adding parentheses functionality to my calculator.

Now the problem is: The calculator solves the parenthesized expressions incorrectly! It solves the first one correctly, and then it's clear it keeps past values in memory and they mess up the next calculations! I couldn't find the source of it.
I know it's probably a little complicated to fix, but you guys got a better chance at it than I do.

Three phase measurement

$
0
0

Hello,all

I have a question about the three phase measurement. I want to measure the currents of a three phase power cable. But I am confused that is it the Grounded signal sources or floating signal sources?

 

Best,

Viewing all 66730 articles
Browse latest View live


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