![](https://lavag.org/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
LAVA 1.0 Content
-
Posts
2,739 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by LAVA 1.0 Content
-
-
QUOTE (rolfk @ Jul 14 2008, 01:53 PM)
I had to reply because I justhttp://forums.ni.com/ni/board/message?board.id=170&thread.id=340676&jump=true' target="_blank">read this Nugget (on the Dark-Side) by Shane where he introduces us to using VISA to interact with USB devices. I would have remained silent if the timing was not what it was.
Ben
-
QUOTE (Adrenaline @ Jul 14 2008, 10:03 AM)
The FPGA can only complete one read per clock cycle. The only thing to do is read from in a loop that iterates N times and have the tunnel build the array.Any loop will work, but the For loop lends itself best to this sort of thing.
The array size must be constant size, if you are trying to read different sized arrays some elegance will be needed when you self build the array.
Because of the limitation that the array must be a constant size, you are much more limited as to how you can build an array on FPGA. For example you can not use Build Array to iteratively build up an array (as it dynamically changes the size of the array, which is not allowed). Also you can not use the Autoindexing function on the tunnel of a While loop. It will only work with a For loop that is set to iterate a constant number of times. One common approach is to allocate the array outside of the loop as a constant, pass it to a Shift Register on the loop, and use Replace Array Subset inside the loop to replace the default array elements with the actual data.
In general you should not build large arrays on the FPGA as they use up a lot of FPGA space and your design may not fit on the FPGA. Programming on FPGA does require a slightly different approach or mindset from RT or Windows.
Polintel,
What do you intend to do with the data on the FPGA? You can store larger data sets in a memory block or FIFO on the FPGA without using up FPGA space. (Memory blocks and FIFOs use RAM that is separate from the FPGA.) You can pass data from the DMA Read directly to a memory block or FIFO, one point at a time, without building up an array in the FPGA.
If all you will be doing is to stream the data from DMA to an analog output, you won't need to do anything else as the DMA implementation includes a FIFO on the FPGA, which buffers the data.
-
QUOTE (Altomare @ Jul 14 2008, 03:26 PM)
There are exemples that ships with the toolkit to demonstrate how to use this function.
http://lavag.org/old_files/monthly_07_2008/post-7452-1216043150.png' target="_blank">
Hope this helps
-
QUOTE (george seifert @ Jul 14 2008, 09:35 AM)
I have a VI that I need to call by reference, but I need it to act like a reentrant VI.Is this possible or should I make a copy of the VI for each instance I need to call (it's only 4 so that's not so bad)?
George
Check out the options that are available for the Open VI ref function. I believe an "8" will do the trick.
Ben
-
Thanks to all for putting up with me. Its been fun.
Ben
(AKA neB)
-
Nice posting Bob.
I must heartedly agree. Style without substance...
-
NI is looking for feedback on the Bug List. See this link.
Please voice your opinions and suggestions. This is your oppertunity to make it better.
Thank you,
Ben
-
QUOTE (Yair @ Jul 11 2008, 05:56 AM)
Maybe it's because I don't file or track CARs (other than an occasional thread), but I don't really get what's so creative about that. Is there something I'm missing?Maybe since I reacll you saying that you don't have the oppertunity to work with the bleeding edge version of LV. Since some of my projects are being developed in the most recent released version, I can relate. In our bull-pen the expression is "Did you win a new CAR today?" So with the addition of a single "L" Norm's t-shirt could be have double meaning;
"Have you filLed your CAR today?"
Nice Norm!
:thumbup:
Ben
-
QUOTE (Pollux @ Jul 11 2008, 10:27 AM)
I just finished wiering pretty large project. And I was wondering how long is it really...I have some C programmer friends who always discuss about their billion lines-of-code project.
I tought it would be fun to tell them: "My project is 3 million km long.
"
If not, how hard would it be to write? (In LV, off course...)
http://lavag.org/old_files/monthly_07_2008/post-7452-1215766712.png' target="_blank">
Hope this helps
-
QUOTE (ikos74 @ Jul 10 2008, 06:10 PM)
Hello everyone,Product Page of Power Relay Output:
http://www.advantech.com/products/8-ch-Pow...d_1-2MLDJ5.aspx
The event which will set or reset the relay is a dc voltage reading acquired by an internal PCI Multifunction Card, for which several VI's exists.
Thanks in advance for any help!
Regards,
John
Years ago I used the ADAM 4017 (Analog Input) / 4050 (Digital I/O) at the university with LabVIEW 5.1.
Here is the code for the 4050 (If you can't open it, you can open the word doc and reprogramm it...):
It's not the style I programm today, but it worked...
Download File:post-1396-1215756572.zipDownload File:post-1396-1215756587.zipDownload File:post-1396-1215756677.zip
-
QUOTE (Yair @ Jul 10 2008, 09:10 PM)
This screams XControl, additional there is an application menu tag for pasting, you can filter for it.
OK, I took the challenge.
A simple start (just using the '0' filter) is uploaded to the LavaCR SVN repository under 8.5x\InputMask, it contains an XControl, with a 'set mask' and 'get mask' method. The project includes 2 examples, one sets the display to a password display, the other one sets a dutch mobile phone mask.
Current features:
- Only uses the 0 filter element (Digit (0 to 9, entry required, plus [+] and minus [–] signs not allowed))
- Beeps on error
- Password
To Do:
- All other filter elements
- It should overwrite when a key is pressed
- A right-click gui during edit mode
- Documentation
See here to get the code via SVN
Ton
- Only uses the 0 filter element (Digit (0 to 9, entry required, plus [+] and minus [–] signs not allowed))
-
QUOTE (Ale914 @ Jul 10 2008, 10:09 AM)
my intent is to hidden the multiple queue registration\duplication in Vis very similar to standard labview queue one'swhit my implementation you can also dinamically add or remove listener on a queue also during sw execution
of corse there are margin of improvement
Ciao
Hi Alessandro,
How doe the primary queues get killed?
I can see were the secondaries get killed by ther recievers, but not the primary.
I have used another approach for creating and maintianing queues to multiple recievers. It is much more complicated than your approach so I'll only outline how I implemented it (BTW it was inspired by Jim Kring Queues with notifiers design pattern).
1) I have a source of data (like a DAQ process) that pushes a list of its channels along with a queue ref into a functional global.
2) It then forks into multiple loops (threads) to support three tasks.
3) The DAQ task uses a queue to pass new data to the "mail Room".
4) The marketing department watches their in-coming mail (queue ref mentioned in #1) for request from subscribers who want to monitor one of the DAQ channels, and passes those requests to the mail-room (via another queue) to let them knowa about a new subscriber.
5) The mail room takes what it recieves from the DAQ (via queue in step #3) and in-turn queues it up to all subscribers. This is done using queue ref that were supplied when they sent their request to the marketing department.
Were this approach was most helpful was in an application where we were collecting data from about 30 sub-systems and the req's demanded that a user should be able to plot any channel vs time OR vs any other channel.
Take care,
Ben
4) The mail room
-
QUOTE (Aristos Queue @ Jul 10 2008, 07:07 AM)
SOLUTION!!! If you set the Window Run-time Position in the VI Properties dialog, the clones will all follow suit and appear in the set location.You know using dialogs is generally considered cheating?
QUOTE
Unfortunately, my really cool idea for using a stack of semi-transparent VIs won't work... I can't make the panel color itself transparent, so the stacked effect of the panel gray is enough to completely hide the furthest back window, even with the palest of transparency settings. A bit of research found that this is a limitation of the operating system until very recently (in Windows at least) and nothing inLVwill let me set the panel to transparent. *sigh*So frontpanel transaparency only works one layer?
Ton
-
You should be able to read all the info from the registry. Here's a quick example to get you started. (There are some inconsistencies in the registry how the version info is stored. See RegEdit.)
-
Great fun too watch. Thanks for sharing. Watch out puppy at home.
-
QUOTE (Yair @ Jul 9 2008, 08:42 PM)
One word:
Brilliant!
Thanks for the laughter
Ton
PS have you clicked any of the AAAAAAAAAA links at the bottom?
-
QUOTE (Tomi Maila @ Jul 9 2008, 02:15 AM)
Ben,You may want to take a look at OpenG Active Object Template(.opg) that is part of class templates I wrote for LVOOP. See OpenG Wiki for more details. Active Object Template is a template for by-reference objects that include a single VI that starts executing when an object instance is created and stops executing when the object instance is closed. The template is meant to be used with Endevo GOOP tool but you can simply create a copy of the class from within LabVIEW as well to use it in your project. Use VIPM to install the template to <LabVIEW>resource\OpenG\openg_object\class_templates. The template requires OpenG Object package to be installed as well.
http://lavag.org/old_files/monthly_07_2008/post-4014-1215584092.png' target="_blank">
Re:Creating these active objects
Going back to my practice app.
I will support multiple picture controls so I set-up a class "Pictures" (note plural) that offers a method "register picture" and uses the picture ref to create an active object Picture". The Picture class object register for events against the picture. The class Pictures maintains a list of registered Picture objects and other methods that are targeted at the class Picture objects. So is good or bad practice to group classes that will have multiple instances into a parent class to allow acces to the children?
This approach effectively gave me by-references access to the unique instances of the Picture objects.
Ben
-
QUOTE (Aristos Queue @ Jul 9 2008, 04:48 AM)
I have a VI that is reentrant. I save the real VI at coordinates X, Y. On the block diagram, I put an FP:Open method call.When the clones run, they open up their FP, but the windows are staggered from the original VI position. I can see how this helps with debugging most reentrant panels, but in my case, I'm trying to put together a user interface where the clones all open stacked up on each other -- playing with transparency to fade windows in and out on top of each other.
Does anyone know of an easy way to say, "Hey, dumb clone, open your FP in the same place as your original"?
I'm not sure this can help but I think that sometimes the "call chain" primitive gives you what you would expect from "current VI path" primitive. I think I saw that in LV 6 or 7 with vit.
-
-
-
-
QUOTE (Ton @ Jul 8 2008, 11:59 AM)
I wouldn't use a VIT but the following code construct (simple example):http://lavag.org/old_files/monthly_07_2008/post-2399-1215532702.png' target="_blank">
This also bypasses the 'I don't know which dynamic VIs I need to build' problem.
We recently did this with a class, and it works great!
Ton
:thumbup:
Ohh yes!
Ben
-
QUOTE (neB @ Jul 8 2008, 04:55 PM)
The "proxy, which provides an interface" The class provides methods which use queues to post method requests to the back-ground VI (*.VIT).The "list of pending requests " is realized by using the queue.
The "a scheduler, " is implemented in code that checks for method invocations otherwise it handles the "update work" (eg scroll text)
The "the implementation of the active object method. " is realized with appropriate code to handle what is found in the que.
The "a callback or variable for the client to receive the result. " is realized in a response queue that is fed from the results of the code for each method.
I wouldn't use a VIT but the following code construct (simple example):
http://lavag.org/old_files/monthly_07_2008/post-2399-1215532702.png' target="_blank">
This also bypasses the 'I don't know which dynamic VIs I need to build' problem.
We recently did this with a class, and it works great!
Ton
-
QUOTE (shoneill @ Jul 8 2008, 11:10 AM)
...It could perhaps also be tied in with Events so that it comes into play whenever certain criteria are met. Queues would be another logical interface choice.
I'm working on such a beast right now. I've recently "discovered" user events and am using them to implement an interface to a process spawned in parallel which then feeds back into the original program via Events. All asynchronous. ...
Shane.
Thanks for that suggestion Shane. I am condicuting some architectural research for an app I have yet to officially design. I will keep that in mind as the design develops.
Another idea that I concidered using for active objects that would have their methods invoked from multiple places it to re-use an idea that was inspired by one of Jim Kring's design patterns (Response with notificaton ?). The idea is to inclue a ref to a "response queue" in the request (method invocation) so that the active object can respond entity that invoked it.
Learning as I go...
Ben
Code performance
in LabVIEW General
Posted
QUOTE (Gary Rubin @ Jul 14 2008, 02:37 PM)
Almost. Darren mentioned it http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=191642#M191642' target="_blank">in this thread where eventually Greg McKaskle came out of hiding and explained with one his classic summary lines "Clear as mud?"
Ben