Quantcast
Channel: All LabVIEW posts
Viewing all 204072 articles
Browse latest View live

Version d'essai LabView NXT

$
0
0

Bonjour à tous,

 

Je suis étudiant et je souhaiterais obtenir une version d'essai de LabView compatible avec un système NXT. Est ce que quelqu'un pourrait me renseigner sur la démarche à suivre s'il vous plait ?

 

Bien à vous,


Falling In Air Vi

$
0
0

Hey all.  I have this assignment where I need to build a Vi to show a speed vs time graph of objects falling.  I have the front panel built like the text book, but I am having trouble with the block diagram.  I assume using the matlab script would be the easiest/best way, but I am having trouble coding this with the given equation.  Any help would be much appreciated!

Screenshot (814).png

Trigger generation using DAQ Assistant

$
0
0

I'm trying to send a trigger in my Labview program to an external device through an NI DAQ board (PCIe-6361). The trigger cable is connected to a digital line (P0.0). In MAX, I can do this by manually turning on and off the line.

 

MAX.jpg

To do the same in Labview, I put two DAQ Assistants in flat sequence with 10 ms delay, each of which inverts the line as shown below (the VI is also attached). 

 

DAQ Assistant.jpg

1. Could anyone tell why it doesn't work?

2. Is there a more standard way to do this (generate a trigger in Labview)?

 

Thank you.

Re: Falling In Air Vi

$
0
0

No need for Matlab. All you need is a FOR loop and a shift register. I assume the initial velocity is zero, so initialize the shift register accordingly.

system exe.vi

$
0
0

Hi

  I made a labview "hello.vi", using system exe.vi module. When I run , no result come out from standard out, Please help me to find out what I am wrong?In this program, I am using comand line to call python to execute "hello.py". it should print out "Hello World". Thanks

Re: Falling In Air Vi

$
0
0

As altenbach hinted, you only have a single variable here (at least, once the application is running).

 

Your v value will change over time (i.e. each iteration of a loop) and your time will change over time (i.e. each iteration it will increase by dt) but g and alpha are known before the start (unless alpha can be changed during the "falling" process - I'm assuming not).

 

Given you know the number of samples ("N"), you can use a For loop and the single Shift Register already mentioned to hold the value you're updating, and calculate "t" via the "i" terminal and a constant dt value of 0.001.

 

Plotting a Waveform Graph can be done with an array of Y values and a constant dt quite easily. If you only want to plot after the VI finishes the calculation (seems likely here) then you can have an indexing tunnel output for "v" and wire that to the Y input of Build Waveform (Analog Waveform) Function. The other values can be set as required (you might not care about t0).

Re: Simple State Machine template to build a simple calculator

$
0
0

Perhaps there is only one horizontal slider intended? The original post was a bit unclear - it mentions a slider, then not knowing what to do about the sliders.

 

If you have only one slider, and an "Equals" button as well as the methods, then you can imagine there might be some "state" in this system (i.e. the result so far of previous operations or the previously entered value, depending on if this is the first operation used or they are chained together).

 

It's still a little bit of a stretch to require a state machine, but at that point you do have some history requirements.

Of course, it could be implemented with an array of inputs including methods and then a parsing operation when "Equals" is pressed, and so no states would be needed (just an Event Structure and a shift register, perhaps with array of strings) but this would be less efficient.

 

If you allow parenthesis, things become more complicated but that sounds outside of the original scope...

Re: Controlling SoftMotion axes via Python?

$
0
0

Hi HeadieOne,

 

I'm not familiar with SoftMotion, so I can't address your question directly, but after looking at the manual for SoftMotion I'll suggest/guess the following: 

  • It doesn't seem likely you'll be able to pass an Axis to Python and do anything particularly useful with it. Others might be able to disprove this, but that would be my initial guess
  • If you're using LabVIEW 2018 or 2019, you can call Python code directly from LabVIEW if you want to use Python to carry out some calculations that you feel more comfortable with in Python than LabVIEW (although if you gain familiarity with LabVIEW, I'm sure it wouldn't be necessary - but it is possible)
  • The coding required to use SoftMotion itself doesn't seem too terrible, so hopefully by looking through examples and the manual you could make some quick progress
  • The manual does make mention of tools like FPGA. If this is part of your project requirements, the learning curve might be a little steeper, but I'd guess that either
    • A) it is not a requirement for you, or 
    • B) it will probably be easier to learn some LabVIEW and then use LabVIEW FPGA than learning some LabVIEW for the SoftMotion, then also having to use VHDL etc (unless you're already familiar with Verilog and VHDL.

 

Perhaps if you try getting started with SoftMotion in LabVIEW you'll find it easier than you expected, especially with the learning materials and forums available for LabVIEW help. If you post programs you're having problems with, people will probably be able to help you.

 

As I mentioned above, if you have complicated calculations you want to use Python for, you can also do that using the Python Node and some information about Integrating Python Code in LabVIEW (note a common issue is to try and return arrays (e.g. NumPy) from Python to LabVIEW - you must return a list in Python to have it as a LabVIEW array using the built-in Python Node).


Installing the Machine Learning Toolkit on 2019

$
0
0

Hello all. Recently downloaded the evaluation version of LabVIEW 2019 which I've already run, so it works. I then downloaded the LabVIEW Analytics and Machine Learning Toolkit from here

 

It seems that there is only a 2018 version and furthermore, it will not install on the 2019 LabVIEW version I just installed. The error given says that LabVIEW 2018, 32 or 64 bit has to be installed. How do I get this toolbox to work in 2019? I have tried to find 2019 versions of this toolkit or posts with similar errors but have not found anything in either case.

 

Thanks,

 

Brian

Labview Installation error

$
0
0

After closing the NI Package Manager, about a minute later I finally get an error "An error occurred when launching the following required file: "GUIExecutableFullPath". The installer might be corrupted. Try redownloading the installer or using a new media distribution.

 

Based on this message, I redownloaded it, but I still got the same results, so that didn't help.(Also I tried offline installer, it didnt work either with same issue)

How to Snyc two While loop?

$
0
0

Hi Friends,

 

I have tried to sync two while loops, but when I stop the bottom they show different time. I think time must be same since both loop have same number process to execute.

 

a. How can I sync my while loop clock? so that during the measurement I can get the same time for reading two different data input from two different while loop?

b. There is difference in time between two while loop, Can we accept that much error?  

c. I have read some previous thread they say,  if there is some data exchange (like there is output variable from one loop to the other) between two loops then they will never sync. Is that true? 

d. I tried to put them in one big while loop then the time for the lower one takes more and making negative time difference. when i remove the big while loop then upper loop takes more time in-compare to the lower one.  since the time i am measuring is not the execution time why there is a difference?

 

I have enclosed the block diagram? Please look for your suggestion?

2.png

 

 

Re: How to Snyc two While loop?

$
0
0

I am not quite sure what the use case is for this but I will answer as best I can.

 

Your VI looks like it will run forever because you have wired false constants into the loop condition terminals. When you say that you are stopping your loop are you pressing the abort button?

 

You have nothing slowing down your loops so they are running as fast as they can, probably using two cores of your CPU, due to non-deterministic nature of windows CPU allocation it is unlikely that both of these loops are running at the same speed, which is why you are seeing a different numbers in your Numeric and Numeric 2 indicators.

 

I think you have misunderstood how local variables work in LabVIEW. The local variable is a data link to a front panel item (indicator/control). You do not need to write to the local varaible within the while loop. Also you have not defined your dataflow very well so the Difference in Time indicator is evaluated right at the beginning of running the VI probably with the last values from when you last aborted the vi. It is possible that the values of Time 1 and 2 could have been overwritten by the time that it has been evaluated but is very unlikely.

 

I have modified your VI to something a little better. As I mentioned at the beginning I am not 100% sure what you mean by syncing your while clocks, but I suspect that using the wait until next multiple would achieve what you are after. Read the detailed help for more details about what this does.

 

Answers to your questiosn:

a)Use the wait until next multiple function

b)We don't know how nmuch error you can accept, only you can answer that depending upon your application. I suspect that you are seeing differences in time because of your use of the abort button

c) I think you are talking about race conditions here, in which case, yes that is right. Be very careful transmitting data between while loops with local variables.

d) Putting them both in a while loop shouldn't make a difference, although it sounds like some nuances of the LabVIEW compiler. It shouldn't affect you if you follow the dataflow paradigm of LabView properly though.

Re: Nipcibrd.sys/ Labview 2019

$
0
0

Hello.
I tried the firmware update for the Intel Thunderbolt controller.
At that time, Windows displayed BSoD.
The dump file indicates that nipcibrd.sys is the cause.
My computer has NI Labview 2019 SP1 and PXI Platform Services 19.5 installed.
Is this a known problem?

Re: Falling In Air Vi

$
0
0

 wrote: and calculate "t" via the "i" terminal and a constant dt value of 0.001.

We don't even care about "t" unless we are not building a waveform data type (which would be silly not to use).

 

But, yes, a simple FOR loop with the numeric functions to do the math and a shift register to hold the velocity is all that is needed.

Re: system exe.vi

$
0
0

Make sure your Working Directory is set to the folder where your python script is.  You might also want to look at the Standard Error output as I have seen functions only output there.


Re: Labview

$
0
0

This is how we learnt în university, we haven't learned the more complex functions yet.

Re: Falling In Air Vi

$
0
0

Ok, so this is what I have so far...

Screenshot (815).png

 

Is this what y'all are talking about? If so, how do I write the equation since Vn-1 is not known?

Re: Falling In Air Vi

$
0
0

V_n-1 is just V from the previous iteration. All you need is an initial condition.

 

In the image you post, you've connected your dt to the shift register. Probably this isn't what you want - since that's fixed you can just use a normal tunnel or place the constant directly inside the loop.

 

The shift register is there for your changing value (I.e. V).

 

As an aside - crossrulz is quite right about the t value - for some reason I thought you needed it during execution for the calculation, but it isn't necessary for the calculation and for a waveform you do not need time values. 

Re: Falling In Air Vi

$
0
0

So how do I connect an empty variable to the shift register?

Re: Falling In Air Vi

$
0
0

Decide what the first value of v you want to start with is.

More concretely - how fast is your object moving before the simulation/calculation starts?

Viewing all 204072 articles
Browse latest View live


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