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

How to read installer version number programmatically?

$
0
0

I need to read the installer version number (not the exe version number) programmatically.  Is there any way?

 

I have a bundled software which has multiple EXE's under one installer.  Commonly I use the installer version number for reference and want to show it up to the user.  Is there any way to get the installer's version number instead of executable's version number?

 

--Ajay.


Re: When are DVRs automatically deleted?

$
0
0

tst wrote:

Not the VI. The hierarchy (which is defined by a top level VI). That's an important distinction, because it means references do generally stay alive correctly.


You are right, this is something different. But the word "correctly" implies that there is some canonical programming scheme for references. Since the concept of a reference is used in a lot of different programming languages and programming paradigms this is hard to believe. "Correct"  in the sense, that LabView is doing what LabView does is a tautology, and I would not ever dare  to doubt this. At least there should be a best practice for LabView. I find sometimes the information provided by the documentation and the context help a bit poor. Often it would be sufficient if I could predict the behaviour from the online help. I spend much time with trying things out. 

 

In my opinion a object should be initialised by a class method. Like this the caller neither needs information how an object is initialized nor what data is stored or how it is stored. For example a property node can contain information which is calculated on the fly, but the user works with it like it was stored in private data.

 

To leave the creation of data to the caller of a class breaks this principle. 

 

I like your idea of identifying an instance by its DVR and find this nice although it does not solve my problem.

 

I solved by leaving the creator VI, which is called by the class constructor asychronously running (my previous idea). The class destructor destroys the reference and the creator stops.  

 

If I create a DVR, destroy it , fetch the value and create the DVR again, do I get the same memory adress and is there a way to evaluate the numerical adress of a reference? This would be like the ampersand operator in C. 

Re: When are DVRs automatically deleted?

$
0
0

dkfire wrote:

To add to what tst wrote, remember that objects(classes) in LabVIEW are by value, not by reference like in c++.



Thank you, but this was clear for both of us. Even if we did not concern to a specific programming language.

 

Possible Issue With Visa Read Efficiency

$
0
0

I apologize for not being able to show you my actual code, however, my question will sort of start off at a higher level to begin with, anyways. I can find out later what I am allowed to share from work if truly need be.

 

Basically, I found a significant delay(6ms) after writing out of data(using Visa Write) on a RS-232 port and reading it in on the other side(using Visa Read). To reduce the amount of code complicating the matters I am currently using the "Continuous Serial Read And Write" example to perform a loop back test using on the single port and am finding the same delay. I observe the delay by time stamping out to a file after the message has been written and after the message has been read in, keeping each step aligned within a flat sequence structure to ensure the order is correct.   [Visa Write]->[Time Stamp]->[Visa Read]->[Time Stamp]

 

1. I am using a termination character

2. The port I am using for this specific test is a built in one on the back of a desktop computer.

3. Baud Rate is 9600.

4. The delay is a very consistent 6ms when the size of the write is 3 bytes, but can jump back and forth between 6-8ms when the size is 7 or 8 bytes.

5. The same delay occurs the same no mater if the Visa Read is set to asynchronous or synchronous.

 

My question is if there is any thing obvious that could cause this 6ms delay. I do not have a lot of experience with serial ports or labview, but from what I am seeing it appears to me the delay is occurring with the visa read. I would think a simple loop back should be far less than  1 ms.

 

I appreciate any help, and again apologize for not showing any code at this point. I can find out later what I am allowed to share.

Re: Floor (roundind toward -infinity) error

$
0
0

Didn't went that far in looking at decimals.

Quotient and remainder function has the same problem yes.

 

I'll try to dig the forums to find solutions, but I think the most obvious is to multiply both number by 10^n with n chosen so that the number I get are intergers (no decimal part). And then I'll use the quotient and remainder function.

 

 

View remote front panel without installing run-time environment

$
0
0

Hello everyone,

 

I have a question concerning the LabView software.

 

I am currently using LabView 2014 to develop applications, which the user can acces by remote front panels (from executable applications).

 

Because of the concerns of the clients IT department, now i am looking for a way of providing acces to the applications without installing the run-time enviroment.

 

I found some documentation regarding this problem but there is only a mention of the internet explorer plugins (which is not enough to display the front panel correcly).

 

What is needed for running the remote front panel inside an internet explorer window ? 

 

Best wishes,

Andrei

 

 

Re: Floor (roundind toward -infinity) error

$
0
0

Hi Nico,

 

the most obvious is to multiply both number by 10^n

Yes.

 

Didn't went that far in looking at decimals.

You should. With floats: always…

(For background see IEEE754, IEEE854)

Re: How to edit Teststand UI controls in the Labview example

$
0
0

The TestStand UI Controls are ActiveX containers. A lot of functionality is prewritten and cannot be changed. For instance the button text is determined by the button itself by reading the TestStand language file depending on the TS connection you have configured for the button.

 

If the modifications to the visual appearance you plan to implement exceed simple configuration setting (a simple configuration being e.g. decal), it is easier to use/modify standard LV controls.

Please look into the examples provided here for information on how to work with this (use the "Black UI" example).

 

Norbert


Re: Possible Issue With Visa Read Efficiency

$
0
0

Hi GameDev,

 

I would think a simple loop back should be far less than  1 ms.

You really think so?

 

With 9600baud it takes ~10/9600s ~= 1ms to transfer 1 byte. 3 bytes will take atleast 3ms. 8 bytes will take >= 8ms. Simple math!

 

Serial port operations usually are done asynchronously: Even when the VISAWrite call is done the data isn't transferred to the "cable", it's just written into the serial port transfer buffer! So you need to add additional delays for the serial port driver and hardware… (The same applies to the receive buffer!)

Rif.: write to measurment file

$
0
0

Hi Pietro,

 

my suggestion is to use the low level TDMS functions, they are more fast than the "Write to measurement file". However, you can also use it without problem.

For setting the interval to your desired one you can try to build a waveform with the desired dt based on the acquisition rate. Then you pass the waveform to the "Write to measurement file".

 

I hope my answer helped you.

 

Kind regards.

Visual Control of an Analog Signal, varying in time

$
0
0

Hello,

 

Here is my setup (Fig. 1), where Coil X - "Simulate Signal" block, that emulates an analog value that varies in some way.

This value is result of a signal processing on analog inputs ... in this setup I've choosed SIN wave just for simplicity.

Is it possible to visualize the evolution of this signal in time ... I mean the "time window" on "Voltage" graph should advance (Fig. 2).

I've tried to use XY graph instead (Fig. 1, at th bottom), applaying the iteration counter of the "While loop" to serve as "Time".

but have got an error message: "You have connected 2 terminals of different types".

 

What could be a solution (of course if what I want is realisable)

 

Thanks in advance

 

Pavel

 

Fig. 1

Signal_Simulation_Issue - Block Diagram.JPG

 

Fig. 2

 

Signal_Simulation_Issue - Front_Panel.JPG

Re: VI documentation

Re: View remote front panel without installing run-time environment

$
0
0

Andrei,

 

you are looking for WebServices.

This requires your application to work as a web service and you (or IT) has to create a web page which interacts with the web service.

 

In case you are not sure what a web service is:

Additions to web pages like local weather information or time services are usually web services which are queried by the web page.

 

Norbert

Re: Visual Control of an Analog Signal, varying in time

$
0
0

Hi Pavel,

 

use a chart instead of the XY graph…

Re: Floor (roundind toward -infinity) error

$
0
0

Hum. Finally, I worked on mantissa and exponent, and added epsilon to division of the 2 mantissa. Seems to work without side effect. For the moment....

 

Many thanks for your help Gerd Smiley Happy


Re: Modbus RTU. Error 6101 occurs by reading from PID controller

$
0
0

Hi Pep91

 

I tried both, leaving the "Visa Set I/O Buffer size" away and repleacing it with the "VISA Configure Serial Port". I also updated the library and now get in all three cases (as it was, with the function left away, and the replaced function): Error -1073807298 occurred at VISA Read in MB Serial Receive.vi:2 -> MB Serial Master Query.vi:1...

I have found this discussion but it did not help me. (http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/I-Get-quot-VISA-Hex-0xBFFF003E-Could-not-perform-operation/td-p/476931)

 

Thanks for your help.

Re: Elapsed time controls inside while loop doesnt refresh value

$
0
0

Ok, so i read about Multithreading and the answer is so simple. I just created two separeted while loops, one for mouse event and one for time elapsed Smiley Happy and now everything works fine.

Re: Serial VISA Read: read buffer string to table of recorded data values? (First Post)

$
0
0
Hi! I am doing data acquisition using xbee receiver.I am able to receive data using LabVIEW visa read.Now my task is to plot this data on graph having time on x-axis and received values on y-axis.Please tell how can I plot the graph by taking values from read buffer of visa read?
I am sending data as (0,1,2) and received in lab view read buffer indicator as 012012012....

Re: Visual Control of an Analog Signal, varying in time

$
0
0

Thanks GerdW,

 

It's much better.

Fig. 1 shows modified block diagram.

But I would like to implement something like "running window" on the axis of time ... i.e. display last 2 seconds of the waveform evolution.

Actually whole Time axis is displayed ... starting from 0 to the last instant (Fig. 2, Fig. 3).

 

Would it be possible to implement such window ?

 

Best Regards

 

Pavel.

 

Fig. 1

Signal_Simulation_Issue - Block Diagram (2).JPG

 

Fig. 2

Signal_Simulation_Issue - Front_Panel (2).JPG

 

 

Fig. 3

 

Signal_Simulation_Issue - Front_Panel (3).JPG

 

Re: When are DVRs automatically deleted?

$
0
0

drjdpowell wrote:

LabVIEW doesn't have a "garbage collector" and I don't believe it is possible to add one easily like one can in an "everything has a reference" lanuage.  Garbage collectors, I believe, increment over all object references and find objects not refered to by any other still-live object.  That doesn't work in LabVIEW.  The "die with your creating hierarchy" thing works well in the large majority of programs that don't asynchronously call VI's.

 

Why are you using a DVR, by the way?   There are other ways in labVIEW to hold common data, such as an "Action Engine".


C is an ""everything has a reference" language". It is not easy to add a garbage collector to C because this requires (in my opinion)  an asychronous thread. You can write an garbage collector in C, but this is not easy even for simple applications. At least you have to fork(); and you should have fork();ed also for other reason. 

 

How and when objects are destroyed is subject of the memory managment strategy. One way might be to increment over the user of the object references. But there are other. If you have only this specific strategy in mind I admit that LabView hasn't a garbage collector. 

 

I am using DVRs because I want to share information between groups of instances of a class. I have learned from the previous (first) question in this forum, that it is very easy to create a copy from a class.

 

In another part of my application I provide a registration service for classes based on DVRs. Like this the registration service can see immediatly if a class is idle, for example.

 

A global variable or a finite state machine can solve this too I think. But I don't use global variables at all, because I want to define for every data the minimum scope. In my opinion global variables mess everything up and have a high risk of unwanted side effects. Due to this FGVs are also an anti pattern for me, although I know that many better programmer than me use them. This can be a problem of DVRs too and I try hard to limit this.

 

Finite state machines are a nice invention, but I do not like the LabView design from 2007 and I would prefer a object oriented approach since my application is already to big to maintain single VIs.

 

Since I use a lot of asynchronous calls, mostly I do not even collect data from them (Flag 0x80), and the VIs I call asynchronously are determined dynamically, the garbage collection strategy of LabView does not work for me.

Viewing all 202447 articles
Browse latest View live


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