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

Problem with "Read Delimited Spreadsheet"

$
0
0

Hey everybody,

 

I am very new to Labview and currently trying to read a CSV file containing 3000 Datapoints measured by an oscilloscope into Labview for some analysis. The format is as follows:

Labview1.png

For this, I am using the "Read Delimited Spreadsheet" vi, with two probes to debug my problem:

Labview2.png

The Probe 9 shows, that the string is read correctly: 

Labview3.png

 

however no matter which format specifier I use for the "Spreadsheet Strong to Array Function", the output at Probe 8 always ends up like this (converted to integer for some reason?):

Labview4.png

 

Since the examples for the Format Specifier Syntax did not feature Input in scientific notation, I am assuming this might be the problem. Is there any way for me to get an ouput in scientific notation using this vi, or do I need to do something more complicated?

 

Any help is appreciated

Naeryan

 


Variable creation in while loop

$
0
0

Hi,

       I am using various indicators in a while loop.Whether for each iteration new variables

(TMVol1,TMVol2..etc)will be created? VI screenshot attached for reference.

If yes,how to overcome this problem. Whether place the indicators outside while loop and using value propery node inside the loop is better  ? Please give a solution

regards

rakesh g

Running System Exec as Admin

$
0
0

I am trying to run system exec as admin using a batch file but always get an error saying the command isn't right.

Change state of boolean button

$
0
0

Hello again, you marvellous people!

 

I have what I hope is a simple question. I'm not including the VI because it's not really relevant (I think).

 

I have a boolean button controlling an LED, but I want a secondary control that, if I press it, changes the state of the boolean, irrelevant of which state it's in at the time (i.e. if it's off, turn it on, if it's on, turn it off). Kind of like a "Not" gate, but without an input.

 

This seems like it should be a simple thing but I cannot for the life of me figure out how to do it.

Ajouter un axe Y sur un graph avec labview

$
0
0

Bonjour,

Comment fait on avec labview pour ajouter un second axe Y sur un graph excel construit avec labview.

Merci d'avance,

 

Ajouter un axe Y sur un graph avec labview

valores de un array obtenidos de una grafica utilizarlos como referencia

Radio buttons to set user defineable Values for DC power supply

$
0
0

Hi all,

 

can someone edit my VI and tell me how to set the user defined Values to the DC power supply?

Also how can I set initial values?

For example when I start the VI that Button 1 is 1 V, Button 2 is 2 V etc.

 

No selection should disable the DC power supply.

 

Thanks!


LabVIEW Driver for Teledyne MX Class and Agilent/Varian ProStar Pumps

$
0
0

Hi all,

 

Has anyone developed a LabVIEW driver for the Teledyne SSI MX-Class MX010PFX3A pump or the Agilent/Varian ProStar Model 210 pump?

 

All MX-Class pumps should use the same general commands, so any MX-Class LabVIEW driver would also probably be acceptable.

 

Thank you,

 

Zach

Datalogging Torque Meter over RS232

$
0
0

I am fairly inexperienced with LabVIEW so please bear with me.

 

I am trying to take data from a PCE-TM 80 Torque Meter which outputs through an RS232 "headphone jack" to USB converter and put it into a format that I can graph in Excel (CSV ideally). I based my code off of this video: https://www.youtube.com/watch?v=T9sgAyjb-Kk (probably not the best place to get code from but I needed somewhere to start). Unlike the video, my VI throws an error as soon as it hits the "Scan from String" VI.

 

I then tried NI's example code to see if I could read anything at all and was basically successful but it gave me two concerns: the data displayed updated every few seconds while I need take a reading at least 15 times per second, and the final number recorded seemed to be cut off (last line of the output window).

 

My basic questions are: How do I get the raw RS232 data into a chart-/graph-able format? How do I make sure I'm taking at least 15 samples per second?

PowerShell script not working with System Exec

$
0
0

I have some PowerShell scripts that I need to call from LabVIEW, but I’m having trouble getting them to fully work. The scripts perform automation tasks using the user32.dll. Everything works properly when I run the scripts from PowerShell, PowerShell ISE, command prompt, and the Run command, but the scripts do not fully work when calling them from System Exec.vi. I have LabVIEW 17.0.1 32-bit on Windows 10 Enterprise 64-bit.

 

When I run the script from command prompt, the command is

 

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file “path to file.ps1”

That works fine, so in System Exec.vi I set the command line input to

 

 

cmd /k

and the standard input to

 

 

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file “path to file.ps1”

A command prompt window opens, and the script starts but does not fully work. The script calls a C# function to do a PostMessage simulating a keystroke. There are more PostMessages, but only the first one goes and then nothing after that. There are no error codes associated since the script finishes, but it doesn't fully work.

 

 

When I run the script with the Run command, the command is

 

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file “path to file.ps1”

That also works fine, so in System Exec.vi I set the command line input to

 

 

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file “path to file.ps1”

with no standard input. A PowerShell window opens, and script starts but again does not work.

 

 

I know the PowerShell and C# side of this is not supported here, but since everything works except for in LabVIEW, does anybody have an idea of why the scripts won’t complete? Would it have anything to do with LabVIEW being 32-bit on a 64-bit computer? Thank you for any input!

 

MPC design problem

$
0
0

Hello,

 

I have been facing a tough time getting a simple MPC working for a 2nd order discrete system. I've attached my code. It comes with an compile error. I don't really understand why. I've remade the model 3 times and it keeps on giving me this error. I've also attached a picture to show how i'm implementing the controller. All the examples i find don't use a control loop simulation. Could this be a problem? I have to use a control loop since the code needs to be programmed into a Quanser device. Any suggestions would be much appreciated.

 

Regards,

Performance of LVclass "Children in memory" node

$
0
0

I'm making an application that uses what is pretty much a factory pattern.  Rather than predefine all possible objects in multiple places, I want to programatically get a list of all descendants of a particular object, and then be able to choose from them on the fly.

 

LabVIEW helpfully comes pre-loaded with the Children In Memory[] Property for the LVClassLibrary reference.  However, when I tried using it, it ends up being pretty slow. (~230 ms to make a list of 9 classes).

 

I've created a workaround that seems to be about 5x faster (~40 ms on the same list) but it's also a bit of a hack in that it just parses the "All VIs in memory" node to find all currently loaded classes, and then checks to see if it can be cast to the parent class.

 

Neither of these options feel like they're the "best" option.  I could probably speed up the parsing on the "All VIs in memory" results some, but it doesn't feel like it ought to be the quickest method.  For compiled applications I can add in a cache check to avoid running the same check twice, but for live code I want to be able to load in classes dynamically.

 

Screenshots for a quick peek:

Time test LabVIEW node.PNGTime test All VIs search and test.PNG

Those were both with the same 10 classes in memory, all with a common ancestor, and about 30 VIs in memory.  I also tried it with the full application loaded in memory, which raised that to 3400 VIs and 96 classes in memory, and the run times increased to 60-70 ms for the "All VIs search" method and changed to 250-300 ms for the ChildrenInMemory[] node method, so neither has a particularly bad scaling issue.

 

Does anyone have a method either more "proper", faster, or (hopefully) both?

 

This is all in LV 2018 SP1 32-bit with the f3 patch applied.  

The sample code is attached.  It was originally a proof of concept LVOOP project that I picked to re-use because each class only has 1 or zero methods, and the classes involved were all descendants of a common "Animal" ancestor (cats, birds, etc.).

VI's created from Static/Dynamic Dispatch Templates have 35 pixel minimum height

$
0
0

So I ran across something strange and wanted to see if this was just me, or if it was happening to anyone else.

 

Open the attached .zip file and open PanelSizeIssue.lvclass. Open both NewVI and NewStaticVI, and try to manually reduce the window size as much as possible.

 

On my system, I can move NewVI to be this small:

newvi.png

 

Basically, the entire front panel is hidden.

 

NewStaticVI, on the other hand, won't get any shorter than this:

 

newstaticvi.png

 

Both VI's have the same contents; one was made from right clicking the class and selecting "New VI", the other with "New VI from Static Dispatch Template".

 

Both panel appearances are set to Default, and Minimum Panel Size is (0,0) on both.

 

I made these originally in LV2018 but have backsaved to 2016. I have reproduced this starting from scratch in 2016 as well.

 

Am I losing my mind with some obvious setting here? It's like the template has some minimum panel height inheritance it's getting from somewhere, but I can't figure out where. I'd appreciate it if someone could open this on their system. It's behaving the same way on LV2016/32, LV2018/32, and LV2018/64, so I assume this is some setting I've managed to overlook. Somehow, the panel size won't go below 35 pixels, even if I manually set it with a property node.

 

(The reason behind this, for those wondering, is I'm trying to make a very small window that's exactly the size of a cell in a table. I need the window to pop up with no borders around the control.)

huge block diagram

$
0
0

I have inherited a VI which has a huge block diagram meaning that I would have to hold and drag the mouse for at least 15 seconds to get from the "left" to the "right".

 

How do I connect something from the left to something on the right?

 

The guy was using global variables.


Need help with Dynamic Events

$
0
0

I am trying to get one case in an event structure to execute automatically after another case triggers. I read up on it and found I can do this with Dynamic Events. I found various things on internet including a Youtube video but I am just having trouble understanding how to make this work. I have attached a simplified VI. I want Case 2 to execute automatically after I trigger Case 1 . Please show me how to do this. Very confused by the Register Events, Create Events, and Generate Events VI's.

 

What I want to end up with is: If I press Case 1 button , LED 1 should light up and then LED 2 lights up as case 2 executes. 

Building simple circuit in LabVIEW

$
0
0

Hello 

I am trying to build a model as shown in the reference image. But I cannot see any output in my waveform chart. When I did analysis by adding piece by piece, I found the outputs disappear when in two cases

1. When I give output of "Integrator_2" to "Multiplier_1"

2. When I give output of "Integrator_3" to "Multiplier_2" or "Divide_1".

Note: Please change the "Loop time" to "1", and input to "377"  before running the vi. I simulated the circuit in Sim-power and it is working fine, where I used "Integrator_1" initial value as "1" and "Integrator_2" initial value as "100*pi". 

When I remove the above mentioned three connections and replace them by some constants I can see the output, But even if I connect one connection, output is disappearing.   

Can any one please let me know why is this happening in LabVIEW.

 

Thank you in advance

Ram 

Using LabVIEW 2014

Rastor Scanning

$
0
0

Hi,

     I recently purchased a pair of Galvo scanning mirrors and would like to operate them using LabVIEW. I need to give two different ramp signals for X and Y mirrors Separately, where I can change the lower and upper voltage limits as well as the slope of the ramp. I tried the same using the arbitrary wave generator, but there is no option for modifying the signal in between. Does anyone know of example on such an application as raster scanning?

Many Thanks,

Nijas

LabVIEW ORM implementation

$
0
0

Dear LabVIEW community,

 

recently I've searched for some information regarding LabVIEW Object Relational Mapping (ORM) Framework implementation (if any), and found this link - http://www.gcraftsman.com/objectkeep.html. What is interesting - this section of the website is not accessible via site menu; actually it is accessible just by direct link (which is indexed by Google though).

I've tried to contact site admin via e-mail form, but no reply.

Does anyone know, whether this is real implementation of ORM, or this is just some tool promo which does not exist yet/or some proprietary solution?

 

Or, on the other hand, are there some others ORM implementation, or LabVIEW doesn't have it yet?

 

Thanks a lot,

 

Sincerely, kosist90.

pci6143采集信号

$
0
0

大家好!请问pci-6143可以采集双极矩形电压吗? 可以用pci-6143采集板采集交流电压吗? 还是单通道采集的电压信号必须是单向的(电压均为正或者为负)

pci-6143采集直流电压信号比采集交流电压信号更稳定吗?采集直流电压比交流电压的好处有哪些呢?

Hi everybody ! Can the pci-6143 collect bipolar rectangular voltage?Can I use the pci-6143 acquisition board to collect AC voltage?Or the voltage signal collected by a single channel must be unidirectional (the voltage is positive or negative)

Is the pci-6143 more stable than acquiring an AC voltage signal? What are the benefits of collecting DC voltage than AC voltage?

Viewing all 69018 articles
Browse latest View live