Jump to content

LAVA 1.0 Content

Members
  • Posts

    2,739
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by LAVA 1.0 Content

  1. QUOTE (rolfk @ Jul 14 2008, 01:53 PM)

    You give indeed to little information about the type of device and such. If it is some DAQ device or similar however the standard mode of operation is to write a device driver and the according user space DLL wrapper. That can be easily imported into LabVIEW through the call Library Node in a way that is completely independant of the LabVIEW version.

    Other means would be to use libusb to control your device. Interfacing LabVIEW to libusb through the Call Library Node is about the same in terms of version dependance but the libusb API is not really meant to be interfaced by high level applications like LabVIEW or VB and you will run in some issues that are usually most easily solved by writing a wrapper DLL that translates between the low level API and the LabVIEW Call library Node.

    Last but not least there is USB Raw device support in NI-VISA. Not sure though from which version of LabVIEW this VISA feature is properly supported. While the feature is completely implemented in VISA, LabVIEW needs to support some extra API access modes to use this feature. A quick look in LabVIEW 6.0 shows that the necessary Nodes to use USB through VISA are not present. LabVIEW 6.1 is the first to support this interface but you will need a recent version of VISA installed on your computer. The first VISA versions had lot's of difficulties supporting USB device RAW access.

    Princiapially option 1 will require you to really write C code. The other two options won't but can't be really considered a lot easier. You will simply implement the bit level protocol of your USB device in LabVIEW itself. Option two will still require some serious C knowledge to be able to properly interface to libusb through the Call Library Node. From that perspective using VISA to control your USB device would be probably the simplest solution but don't expect it to be trivial. One disadvantage of the two last options will be that you can't really leverage off that solution for non-LabVIEW users such as Visual Basic, Visual C, etc.

    Rolf Kalbermatter

    Excellent reply Rolf!

    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

  2. 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.

  3. 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

  4. 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

  5. QUOTE (ikos74 @ Jul 10 2008, 06:10 PM)

    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

  6. 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

  7. 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's

    whit 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

  8. 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 in
    LV
    will let me set the panel to transparent. *sigh*

    So frontpanel transaparency only works one layer?

    Ton

  9. QUOTE (Tomi Maila @ Jul 9 2008, 02:15 AM)

    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

  10. 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.

  11. QUOTE (Yair @ Jul 8 2008, 07:43 PM)

    I assume that this happens because RT ....

    Sorry to disappoint you, this happens on any given platform. Every iteration a new queue reference is created, this is 4 bytes of data. By creating a loop at 5 ms I could easily see the memory usage rise of LabVIEW.

    Ton

  12. 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

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.