I think you are pretty much on the right track with Queues. I have
implemented a very similar system myself using queues. I have even
different systems connected to the serial interface, but I can
synchronise them all easily using the following method:
1) Make a VI for opening the serial port
Check the rights for your user on the computer. Right-click on the
file and choose security settings. If you don't have full access, set
it to full access, or have the administrator do it for you.
I experience this a lot at work with some funny rights on network
drives. LabVIEW likes reporting
This is (IMHO) a fundamental question in computer programming.
The discussion quickly enters into areas of Architecture, Development
processes and so on. Since I'm not actually a trained Programmer (I'm
a learned Programmer) I don't know what these all really mean.
In my experience, it's
Right-click and select properties. Then select the tab for security
settings.
I'm assuming Win2k or WinXP. And there is no workaround as far as I
know.
Shane.
Baud, stop bits etc. is purely personal preference.
LAbVIEW can read in basically any format, but I have a personal
preference for tab seperators between values and newline/carriage
return as a termination.
This way the text can be streamed to a text file and is readable
afterwards in Excel
Or write the application in LabVIEW 5.0 or 5.1. the Application
bulder there creates exe files without links to a runtime engine (it
didn't exist back then).
This will result in executables of around 3-4 Megabytes each (at
least), and doesn't support the new features of LV 6 or 7, but if it's
I seem to be having a problem with inserting into a Queue.
I have a data acquisition system running with several VIs running
independently int he background (loaded with VI Server) and
communicating via Queues.
I want to add the ability to load a previously-recorded data set,
capturing the load
Oops, found the problem. Sorry, wiring mistake.
Shane.
If you mean by debug that the highlighting is switched on (Data flow
shown graphically as it happens) then your problem is most likely
timing.
LabVIEW operates many operations in parallel (or almost at least)
unless there's data dependency between functions. If one function
relies on another,
You right-click on the VI icon when it's open and choose VI options.
Under Execution (I can't remember the exact text, my version is in
German) you can choose specific options for the window appearance. In
the version I have posted, the options for Show panel when called
and Close afterwards if
I suppose, when thinking logically, if you wish to set the version to
X, you could set the version to 0 (Saving in a new file) and then save
it X times.
I know it's a bit stupid, but hey, why not?
Shane.
Of course, that's not a bad idea either..
And definitely more refined.
Shane.
Instead of using mouse down you can use the value changed to ask
for a password and re-set the old value (provided by the event
handler) in case the password is wrong. Just make sure that the
non-approved changed value isn't being accessed while the
verification is taking place. (Synchronous
I'm not quite sure what you mean. If you mean that the A/D card
delivers no values when there's nothing connected, then I'd contact
whoever sells the card. If you mean that the LabVIEW function doesn't
work without wiring channels to it, then I agree it doesn't work.
You need to wire a channel
I don't know about accuracy, but I noticed something funny last week
while running a program.
I have a program which communicates over RS-232 and I need to make
pauses now and then. After sending a few commands, I set the VI to
wait for 20 minutes (120 ms). If I call the 20 minutes, half
I only have the evaluation version of LV 7 on my computer, and I don't
have any DAQ installed for it. Therefore, I can't test the program.
I have seen, however, that you send 0 to the parameter for number
of scans for the AI Start function. Is this correct for continuous
scans, or should this
The only thing I can imagine is if the input range is set too high
(The gain too low) so that the resolution is too low to detect any
better then +- 0.465V. +-0.465 V is a HUGE threshold if this has
anything to do with resolution! Are you sure it's Volt, and not
Millivolt?
Shane.
This is the correct answer. %f interprets only numbers and either ,
or . depending on what your system uses as a decimal seperator.
If you want both numbers, you need to use a format specifier of %f-%f
which tells the function to get two numbers seperated by a -. This
will return two values
If I'm not mistaken, all data operations done on references must be
done in the UI thread. Depending on what thread the sub-vi is
normally running in, this can have severe performance issues.
Have a look a
Hi kostya,
Using property nodes with your VISA wire, you can get the information
under Interface Information and then Interface Description. This
should give COMx as a string output. I use this to differentiate
between COM ports and LPT ports, something which it otherwise hard to
do.
Hope this
Hi Oliver,
With Autoindexing it won't work, but manually indexing with index i
mod Arraysize should do it.
Not the MOST elegant solution, but it should do the trick.
Regards
Shane.
Hi G=E9rard,
you have two main options
either replace the for loop with a while loop (N needs to be
determined programatically) or place the contents of the FOR loop in a
case statement, leaving one case empty. By pressing a button linked
to the case statement, the calculations for the
I don't think this can be done. AFAIK, the VISA functions rely on
instruments already found (either by MAX or otherwise).
However. Sometimes when using VISA with a control, I'm only
presented with a certain choice of COM-ports. Editing the values to
an instrument I KNOW exists, but isn't
Hi Pawel,
try copying all of the bolck diagram and pasting into a new VI and
resaving. This works for me most of the time.
Hope this helps
Shane.
Hi Pawel,
Copying everything in one go from one block diagram into a new one
normally copies all front-panel objects too (which arelinked to the
block diagram) and maintains their positioning/formatting. I don't
quite understand how this will take a lot of time. The sub-VIs don't
neccessarily
Nice answer. Once again, hadn't thought of this.
4 Stars.
Shane.
One guess might be Import taxes from a non-EU country.
Another might be because of the localisation which has to be done for
europe which might them be spread over ALL European versions of
LabVIEW.
Just guessing.
Shane.
Hi Glen,
Could it be that you're updating indicators on the main VI panel
through references in the sub-vi? I know LV does this automatically
sometimes when you make a sub-vi out of an existing piece of code and
as far as I know uses a lot of CPU time...
Even still, 10 times slower is really a
Nide idea Ed,
Never thought of that Just leaves the problem of output values (if
this is required), but should be easy enough to do.
Shane.
If you are talking about arrays of boolean values, please bear in mind
that a boolean in LV occupies 8 bits. I remember reading that this
was changed over previous versions (LV 4 to LV5?) for compatibility
and simplification reasons.
If you need to generate a 32-bit number from 32 booleans,
The names of the controls really should be kept constant during
development. this is, as you put it yourself, as if the names of
variables are constantly being changed in other languages. This is
not a good idea. One way of maintaining constant naming, but still
allowing the users (programmers)
Hi Everyone,
I just had an idea which never occurred to me before.
Instead of using the ms timer, why not use the function Get date/time
in seconds. This returns a DBL which (according to my calculations)
should only wrap after many many years. This function also offers
sub-second timing.
Hi John,
You mean apart from connecting the projector to the VGA (or better,
DVI) output of your graphics card?
Greets
Shane.
I'd still go the way of connecting to VGA or DVI. A craphics card
with two VGA outputs (or one DVI and one VGA) could be used to display
the VI on the computer on one screen, and the captured image in
full-screen on the second.
I have no experience with telling LabVIEW to use one screen or the
I'm not sure if I'm on the right track here, but if you're saving the
file through LV, then a look at the code should reveal everything you
need to know about the file. The easiest thing may be to write a VI
to convert the data into a more Matlab-compatible format. This
requires also that you
The VI stops after 3-4 Weeks you say? This sounds familiar. Do you
have a Timer(ms) function in this VI coupled with the stop criteria of
the loop? The ms counter is an U32, which can hold max. 4294967296
ms, which equals 49.7 days. Note that the counter starts immediately
when the computer is
Try copying everything in one go into a new VI and saving this VI.
Often this fixes any random corruption the VI may have suffered.
Shane.
You originally stated that you tried opening the Vis and LLbs in Word
and in Editor, therefore the assumption that you thought the files
were text is justified.
We are all volunteers here trying to help, please try to remember
that.
Shane.
I think you need to explicitly include the dynamcially-called VI when
compiling the executable. It's under the heading support files I
believe. The compiler has no way of knowing which VI is dynamically
linked (hence the term Dynamic).
Don't worry, I've made this mistake more often than I care
The example doesn't give an error on my machine either (P4 1.6GHz, 128
MB Ram, Win2000 SP4, LV 6.1).
Have you got any Virus scanners running?
Shane.
Hi IMMA,
As far as I know, %f should do the trick. However, you need to take
into account the setting for the local decimal point. If your machine
is set to use comma , as decimal point, the scan from string will
stop at 3 because it doesn't interpret the dot . as part of a
number. There is an
Hi Wiebe,
I did not know that. I thought that this was maybe just in LV 7.0,
but I just looked in my LV version (6.1) and wow, it's there. I never
knew that. Thanks for the info. Shame I can't give your post a
rating
I have encountered this problem quite a lot, and this will help solve
OK, I had a look at the help for LV 6.1, but saw nothing about %p.
You also haven't explicitly mentioned how this works in your original
message.
Can you give me an example of this (textual will do) so that I can try
it out? What does the %p option do?
Thanks
Shane.
Aha. That's interesting to know. I don't suppose it works scanning
from a String?
Thanks again
Shane.
Hi, it's me again,
I just wanted to add that you maybe need to be careful with upper and
lower-case letters. Since the upper-case letters are lower in the
ASCII table than the lower-case letters, zz is the last possible
match, not ZZ. If all your letters are upper-case, this won't
make
This won't work without changing the router settings, which I think
the school won't like doing.
I'd try to find a different way to do this if possible. Do you have
the possibility to upload to a shared directory somewhere in the
school, from which you can access outside the school?
Ask the
It's quite easy. You split the string you want to send into an array
of characters, and then using a for-loop write each character one at a
time, followed by a small wait (whatever your instrument requires).
Regards
Shane
Sorry to but in, but I think he doesn't have LV 7.0 or 6.1.
Sorry, but I can't actually help either (only have 6.1).
Shane.
Hi Ian,
There are a couple of ways I can think of.
The first is only useful if you know you don't have any multiple
entries in the array. You can get the value of the selected cell
(over the ArrElem.Value) property, and compare this with all of the
vlaues in your array.
The second method
Zvezdana,
That's great. This is exactly what I was looking to do. I have to
say though, that I think the usage of the Array element property
node of an array should respond to a highlighted cell, not the last
clicked cell. This would make the need for system DLL calls
unneccessary.
Still,
Check the user rights if you're using w2k. I'm constantly getting
problems with our w2k Network with file permissions being set so that
LabVIEW can't read the VIs being used.
Copying to a local computer doesn't always automatically mean you have
full rights for the file.
Just my idea on the
51 matches
Mail list logo