OK, but if you do not want to install the whole run-time engine (e.g.
to avoid having files in Program Files\National Instruments, which our
users would not recognise as something they need and may delete) you
could previously get away with having the run-time files in the same
folder as your
Another things is that the RTE for LV7.1 is huge. The way we included
files in LV7 we could build installers with the necessary RTE support
that we could e-mail (3-5 MB)...
After upgrading to LV7.1 it seems impossible to get away from usig the
application builder's installer (if you want support for analysis
VIs), terrible enough, however the installer seems to replace the .ini
file I include as well. If I distribute hello.exe I normally include a
hello.ini file with
Perhaps that's the problem; I did not add it as a support file in the
build of the app, but as a file in the files section of the installer
setup (should still work, but maybe there is a minor bug there...).
Mads
We normally build our install sets with a third party tool and to
avoid having NI's name anywhere we include all files in that set.
With LV7.1 it's no longer enough to just have the lvanlys.dll included
if you use any of the analysis functions though - and the question is;
do we really have to
Give the sub-VI references to the controls and indicators. In the
sub-VI you wire the reference inputs to property node(s) and write to
the value property. You can obtain the references manually by
right-clicking on the control/indicator and create the reference, or
you can do it dynamically by
The server part is OK. I see the session handler opens a database, my
guess is there is something there that prevents parallell replies. If
you strip down the session handler to just reply with a string
generated in the handler; are things still not able to run side by
side? If it's not could you
How exactly do you spawn request handlers? Do you call a reentrant
handler VI dynamically with the run method?
It's possible to have multiple connection handlers that handle
requests in parallell, I do that in several of my client-server
applications. All clients connect to the same port, that's
On the client side the users will need to fill in the IP address or
domain of the server. If that IP is on the Internet or somewhere else
that will work as long as the client PC has physical access and
permission to open a tcp connection (no firewalls that block the port
you are using etc.)
Make
Why do you convert the sgl to an integer string and then to a U8 and
then type cast that to a string which you send? All you need is to
flatten it to a string (once) and if you want to keep the precision
you cannot convert it to a U8.
If you have an SGL and want to read that SGL across a serial
Yes, you can pretty much multiply the memory footprint of the
reentrant VI with the number of instances you have. In other words
having 50 instances of a 300K VI will cost you quite a bit of
memory...if the VI is smaller it's not that much a worry though.
You need to set two properties to activate the correct cell and then
you can read it's string property.
The positioning properties are the ActiveItemTag and
ActiveColNum properties. With them you select the tree item by it's
tag and the active column. The string can then be read from the Cell
Yes, that's how they are normally used. You can pass the notifier
reference via wire or global, or obtain it by name in each VI.
No need for an XY graph in this case; just wire the array to a graph
and if you want to zoom in on something programmatically you can
control the min and max, scaling and pretty much everything else using
a property node (just right-click on the graph, select create property
node and then click on
If you want to change the child text of an item without rebuidling the
tree it seems you must do this cell by cell (set active tag, set
active column, write cell text), is that correct?
(I expected it to be possible to just specify the child tag and it's
new child text array, like when you add
Getting the panels to look just as good no matter what font and font
size the user choose is close to impossible. As you say NI does not
look like they have payed it much attention either; even the startup
menu of LV get's cluttered if the font size or type is wrong.
The best option if you want
Well, I'm not blaming NI for all bad things in the world...However I
do think people expect a better workaround than the one NI has chosen
in LV7.
As it is now it's much too easy to end up with LV menus completely
unusable. As Greg indicates in his answer as well; ignoring the font
choice and
In short, because the table is a control, you'll need to use a local
and write an empty string array to it.
The button should be latched (right click on it on the front panel and
select mechanical action-latched until released) and wired to a case.
Right click on the table on the diagramme and
3D array handling is not much different from 2D, you just have another
coordinate to specify - page (row, column, page). Create a 3D array
constant and wire it to e.g. the replace function and it will
automatically scale up to show you the index and length options
involved...
PS. If you have XY
Just create a local of the tab control and write the index of the page
you want to that local.
Normally introducing a sub-VI is trouble-free and as you say it's
better to arrange the code that way. If the code is to be called
repeatedly (thousands of times) and it all needs to finish as fast as
possible the accumulated overhead introduced can get significant and
you must skip the sub-VI.
I could not notice any speed difference. If the one without sub-VI is
set to full speed then yes the one with sub-VI will slow down because
the other one is taking all the CPU time, however that works the other
way around too (if you set the sub-VI type to full speed first).
This is true only if you use the Wait until next ms Multiple, the
Wait function on the other hand will always give the CPU it's rest...
It's kind of in the middle;-)
As Rolf says if there is other code that takes all the CPU then sure,
the wait included in another code does not help...But for the code
that the wait is involved in it will allways ensure a halt, contrary
to the wait until next ms which would immediately let
Store the time zone in the file as well and so when your application
opens it in Prague you calculate what time offset you need to apply to
the DBL and calculate the Sydney time.
Check out the following thread:
Not sure exactly why you want to do this but you can keep the
previously read data in a shift register and concatinate it with the
new data as it arrives.
This can become costly (memory and speed-wise) if you read a lot of
data and concatinate frequently. If you can avoid reading the data
until
You need to set the active Y scale (just expand the property node and
make the other one the active Y scale property. If you have a sorted
array of names just wire it into a for loop with the property node
iside and the Y scale wired to the index of the loop.
(i) Yes, same with LV.
(ii) You'll need to do a read. The read has a timeout input so you can
do a 0 second timeout if you want.
Right-click on the tab and select Reorder controls In page from the
menu that pops up.
In LV the wire is the variable.
The controls and indicators are not supposed to be that much involved;
they are there for GUI purposes and are used to send data to and from
sub-VIs. Not much more.
If you need the data many different places wire it there. The
indicator can only show one result
In such a case I would skip the indicator and local and use either a
que or a functional global to receive the output from the TCP
function.
If the TCP reads separate messages the que would be my first choice.
If it just read the data as it is I would use a functional global to
hold the traffic
Wire the two numbers to the Join Numbers function found on the
Advanced-Data Manipluation palette. Then wire that number to the
Number to boolean function.
If the numbers are strings you can simply concatinate the strings and
then type-cast it to an integer which you send to the number to
boolean
The functions palette has a choice called select VI...(icon looks like
a VI icon inside a dialog bubble) choose that and browse to the VI
you want to insert as a sub-VI.
If you use a function frequently you can put it in the user.lib
directory and it will automatically show in the user lib
Use variants.
If you want to see how this is done download the OpenG toolkit
(www.openg.org) and have a look. Most of it's VIs are polymorphic and
will use the correct type if it's available in the VI set, however for
all other types it will use the variant based one.
The most common and probably safest is to use uninitialized shift
registers to hold the previous data. This technique is frequently used
e.g. to create functional globals.
You write your command to the port, then immediately check the bytes
at port and read those. Now since the time delay between these two
operations are 0 no bytes have yet arrived at the port and so the read
function is asked to read 0 bytes...
If you know how many bytes the reply will consist of
If the unit has a driver in the form of a dll you use a
code library function node to call that dll. You can find lot's of
information and examples on calling dlls in LV. If there is an activeX
driver there's activeX functions you can use to call that. (If nobody
else has made a wrapper-VI for the
RS485 is used by thousands of different units. Normally it will look
just like a standard serial port to the application and you can use
the serial VIs to communicate.
The scan for device, acknowledge etc. that you describe is not part of
the RS485 standard, it must be something specific for the
If you have LV7 and have installed the .Net framework there is an
example included with LV called SimpleTaskMonitor.vi, it does just
that - using .Net
Clearing a local is the same as writing an empty string to the
indicator (or another local of it in write mode). Use data flow (may
need the help of a single-frame sequence e.g.) to ensure that you have
read the local before you write an empty string using another local...
If you have an
XY-graphs do not have an in-built buffer the way charts do (there is
no XY-chart) so you will have to hold the data in a buffer/buffers you
make yourself. A circular buffer is a good option for this.
Let's say that when adding an input you dynamically create a circular
buffer for it and you also
The event is only triggered by changes from the GUI.
In LV7 the Value (Signaling) property was introduced though and if you
use that it will generate an event.
Nice to be of help.
In LV5 you'll need to wire a boolean out of the case, as you can see
in my LV7 code there is a tunnel there that doe snot have an input;
it's because in LV7 you can specify the tunnel to return the default
if it's not wired; in this case a false...
Here's my first take on this:
Unlike other events the timeout event will not que up and it will
restart it's counting when another event has happened. The time value
will be the time it is handled, not the time it went into the que as
with other events.
So let's say that there was a timeout at
Has anyone made a function that detects and/or can intercept shutdown
requests (this question has been raised here by others earlier, but no
answer yet...)?
I have an application that must be able to quit properly in such an
event.
Yes you have to give the reference to the event to the other VI (by
wire, functional global or other).
Events are qued, you can't loose events - that's one of the advantages
with ques.
If you have added a comment to the file and want to read it and
separate it into different substrings later on you will need to
include a separator in the comment you write. Otherwise there is no
way the other functions will know how to unbundle it (since it's not
bundled but concatinated...).
You may have saved the VI with the controls and indicators set with
the 100K elements as default. In that case the arrays are saved in the
VI and it wil take up a lot more space than the code would...
Working with large arrays there are a number of pitfalls (most of
which involve continously
Your are thinking about the 2D array in the shift register, right? If
so then right click on the left shift register and create an empty 2D
array and wire it into the shift register terminal from the outside of
the loop. This will initialize the shift register. Uninitilized shift
registers are
Yes. SubVIs keep their own copies. This is one of the reasons why
rules like modulizing the code into sub-VIs are best not followed when
you work with *really* large data sets; then it's best to keep the
code as flat as possible.
I think there has been a large thread here about this earlier where
Thanks Greg!
The color I was looking for is 16777271,
works as expected (the color picker just shows it as black though).
Can we have more system colors on the palette next time...?:-)
We used to do that ourselves; but at a point we decided that it looked
better to follow the windows theme. It takes some time to ensure that
it looks OK on the most common themes, but it makes things look more
native for the users.
I've overlooked the dialog label(!)...in this case we haven't used
separate labels so the coloring Greg helped with was nice to get, but
I'll use the dialog label in the future.
We use system colors and dialog control for pretty much all our GUIs,
but we've run into a problem when using a system background color on
text labels on tab controls: There seems to be no system color that
will match the theme color of a dialog tab control...
We use the text labels as names on
Could you please define exactly what it is you want to get as an
output and where you are to use that output?
If you just terminate the inner loop the outer loop will iterate and
thus restart the inner loop. The inner loop has it's conditions set to
stop but that just means that it will run just
The best is probably to make a simulation software and then use a
null-modem cable and have your application talk to the simulator via a
loop-back serial link...But making the simulator could be some work
(if it's just a few commands to support it should be possible to make
within an hour, but
To get access to TCP/IP, UDP etc. on a PC without a network card you
can install a virtual network card / loopback card. As far as I
remember you can find it as an option if you try to add a network card
in the add device panel...
We've used this on some occasions to be able to use our tcp/ip
Which he will have available if he installs a loop-back card driver
(comes standard from Microsoft)...
Globals are only global within one and the same executable, if you
need two different applications to share a variable you'll need to set
up a link between the two.
You can use TCP/IP, DDE, a file or other ways to communicate between
the two.
If the communication you need is very simple, like e.g. just to get X
modbus register values from the unit then opening a serial og tcp/ip
link and sending a fixed string to the unit (assuming it's a
slave...is it?) will do the trick. Then you'll get back a string that
is fairly easy to decode
It's due to the fact that you are displaying all those 100 000 values
and updating them in the indicator on every iteration.
If you move the indicator outside of the loop so that it will only be
updated when the processing is finished things will run fast.
If you just need to save the values there are variant based tools for
this included in the OpenG toolkit, you can find it on www.openg.org.
If you want to save properties as well have a look at the Property
Saver Toolkit at:
http://www.kshif.com/lv/index.html
Most often controlling the closing and opening of the panel is done
from the VI properties - window appearance setup, there you can set
whether the VIs front panel should open when called or loaded and
whether it should close when finished. The same properties can be
set/overrun when calling the
This is done using a property node. Right-click on the control and
select create - property node. A property ndoe will pop up on the
diagramme. Click on the property node and you can select what property
to read or write. You can expand the node to include multiple property
terminals. You'll find
The occurence halts all execution until it is set, no CPU load.
I would use a functional global to store the boolean, or skip the
boolean all together and just have the functional global store the
time. The global should have read and write funtionality, and when you
use the write method it should update the time...
You mention events and events do not need
Sounds like there is a copy of the arrays that is never deleted...but
it's not good to tell without the code. You could try stripping away
parts of the code and see if there is a certain part that keeps the
memory (try loading the VI dynamically and then unload it completely,
do you see the same
No.
When the server receives requests from the clients, does it really
reply in parallell, or does it handle the requests sequencially?
If the latter, improve the performance by dynamically creating
connection handlers that process requests from each client
individually.
Compression is another thing
Need to be more specific; What is it that takes 600 ms with RS232 and
1200 ms with RS485?
The reason is that the value sent to the split function is not a 16
bit number as it should be (to be splitted into two bytes), but an
I32. It's the constant (50) that the angle is multiplied by that
forces the type from U16 to I32, just change the type of that
constant.
LabVIEW tries to indicate
You register the control, but there is no event case that acts on that
dynamic event...
I assume that what you mean is that if you run the aquisition more
than once you want to keep the samples from the previous runs on the
graph...right? Like a chart but with XY functionality.
In that case you will need to make a buffer, e.g. a functional global
style rotating buffer (If you can
Check out this one:
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101RPAGEID=135HOID=5065000800943BUCATEGORY_0=_49_%24_6_UCATEGORY_S=0USEARCHCONTEXT_QUESTION_0=string+to+VISA+resource+nameUSEARCHCONTEXT_QUESTION_S=0
It's unclear exactly what you have done different to make it run
slower; have you always had that subVI there and called it, the only
change being that it is set to dialog...or have you done other things
too?
Wehn you say things are slow - is it just that pop-up VI or does the
whole machine slow
If you have 1-D array of XY-clusters and you want to extract all the X
or Y values as a 1-D array just wire the cluster array to a for-loop
with auto-indexing on, then wire the cluster element inside the loop
to an unbundle function, and wire the element you want an array of out
of the loop with
If it's a boolean you just put the VI inside a case and wire the
boolean to the case selector...
If it's another type of control e.g. a numeric you can either use an
event structure and add a value change event case to it where you put
the sub-VI or you can store the previous value in a shift
If you have the data in a table all you need is to split the table
into the X and Y parts (using the index array function) and then, if
needed, convert the value to a numeric (the timestamp might e.g. need
to be converted from a text string to number of seconds since...(?)).
Now with one array of
Very simple; just wire the string to a scan from string function and
extract the month, day, year, hours, minutes and seconds as separate
numbers.
Now the date/time to seconds function takes a cluster of these numbers
and converts it to a timestamp so all you need is to bundle the
numbers into
You assume correct...
OpenG (www.openg.org) has a nice toolset to automate the build process
by the way. Since Inno setup works on text scripts you can create an
application that easily lets you do both things, and with an interface
just the way you personally prefer it:-)
If you have the full development version of LV you can use the compare
VI hierarchies function from the Tools- Compare menu.
If not you could open the llb with the VI library manager (Tools menu)
and check the show dates box you can see the dates of all the VIs.
Yes as long as there is no data flow dependancies that stop one call
(e.g. if sub-VI no.2 gets an input that is the output of the first
one). You don't need to stop at 2 either, you can have multiple
windows...as far as it's practical and user friendly.
Use a porperty node and write a true to the key focus property of the
text control.
If you need the OK button to react to an enter just right click on it,
select advanced and key navigation and set the shortcut to enter.
Instead of using a dialog box to retrive the keyboard input though I
would
Unless you create a reference manually from the control the only way
to get the reference is to use the front panel controls property
AFAIK, however - extracting the reference to a specific control from
that array is easy. If you know the index just wire the array to an
index array function and
What exactly is it you want to calculate an average from?
You say you want to average the first 10 and then the next 10...which
sound OK, then it's just creating an averaged graph, but you also say
that in between the averages there are 6 values you don't want. Are
you saying that you want the
If you right-click on the VI's icon in the top right corner and select
patterns you can select a connector pattern that has more terminals.
The maximum is 28.
If you ever need more than 28 the solution is to use clusters and
arrays.
You can also adapt it exactly to the number of terminals you need; if
you have 16 and just want one extra just right-click on the pattern
(where you assign terminals) and choose to add a terminal.
You do not need to use them all, just select a pattern that has more
than 17 and wire up the ones you need.
If all you need to do is to calculate the average of a segment of the
array just wire the array to the array subset function and specify the
start and length of the subset you want. Wire the output to the
average function (or a sum-function and then divide by the length).
If the arrays are very
Too general to really tell.
There's probably something in the application that gets an invalid
input when it is built, causing the thing to crash...Do you read a
file, open a dll, port etc, create an array...Look for things that if
given the wrong input might run amok...
Try to put different
One solution is to change the value of the boolean by using the
value(signaling) property. Unlike e.g. changing the value using a
local this will trigger an event (events like this only trigger when
there has been a user interface activity, that's why using a local
won't work).
The other solution
There are two ways to do it. You can bundle an array of X values with
the array of Y values and then build an array of such clusters, OR you
can bundle the X and Y values so that you have an array of XY clusters
and bundle the whole array to get a cluster with that array and then
build an array of
This is where LV's polymorph functions make things very simple: just
wire the strings into an Equal? function (from the comparison
palette), if they are equal the output will be a boolean true.
The file read functions have a count and an offset input. Just tell it
where to start in the file (offset) and how many elements of the given
data type you want. Read the block, analyze it and then read another
portion of the file. If you want to start where the previous read
stopped just wire the
94 matches
Mail list logo