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 (BrokenArrow @ Nov 17 2008, 11:19 AM)

    ... then the global variable implementation of a semaphore is a stop sign, partially obscured by weeds and limbs, on an abandoned contry road where race conditions exist freely ...

    ... and a troll that live under a nearby bridge wakes up and repaints the sign depending on the phase of the moon and the house in which you will find Mars.

  2. QUOTE (BrokenArrow @ Nov 17 2008, 09:13 AM)

    Minh,

    Yep, a LV2 global, like OpenG's "Data Changed" is a great tool to prevent train wrecks. I agree that the structure of the semaphore is strange. Why on earth should there be a "Not a Semaphore.vi" if the structure were not conducive to abuse and mixing with other things?

    Val,

    Good point! It looks like 8.6 has replaced the CIN's with Queues and other dodgy bits, and 8.5 uses CIN's. Even NI agrees that it was never necessary to begin with! :D (kidding).

    Semaphores are very useful for controlling access to shared files. If parts of the code require continual upating of a file while another must read from that same file, a semaphore can be sued to prevent issue with the file pointer of the "read" to screw up the file writing. Under many conditions I can avoid the semaphore by putting the file I/O in an Action Engine (that is automatically protected using a mechanism very similar to semaphores) but if some of the File I/O is CPU intensive, I may be designing in additional bottle knecks. By using Semaphores to protect the file access, I can reduce the bottle-kneck to just the File I/O and nothing else.

    Note: Any shared resource can be protected the same way the file is protected.

    Ben

  3. QUOTE (labviewRTS @ Nov 14 2008, 12:26 PM)

    Does anyone here have an ideas on how to implement an Air Crash management System or Aircraft management system using Labview. I am interested of starting a design for this application. Please guide me what tools should I need, is it using compactRIO, FPGA or others?

    Can you define the functionality and requirements of this system in a lot more detail. Then we can provide some suggestions for you. Are you planning to build this for yourself, as a contractor, to bid on a project?

  4. Is the timed loop necessary?

    Using a timed loop that fast with that much code in it is doomed to overrun it's timer. (something you don't check for).

    I would read the values available, sent them via a queue element by element to a lower priority loop, that does the publishing of the shared variable.

    Should the two can's read one after another? If so just place them in one frame with error clusters connected.

    How you have programmed it you throw away the parallel power of LabVIEW.

    What currently happens:

    t->

    PollC1----ReadC1----ProcessDataC1-----PublishDataC1

    -----------------------------------------------------PollC2----ReadC2----ProcessDataC2-----PublishDataC2

    What could happen (if you want it):

    t->

    PollC1----ReadC1----ProcessDataC1-----PublishDataC1

    PollC2----ReadC2----ProcessDataC2-----PublishDataC2

    Now if you start queueing data the following can happen:

    t->

    PollC1----ReadC1----SendQ1

    PollC2----ReadC2----SendQ2

    ReadQ1----ProcessDataC1-----PublishDataC1

    ReadQ1----ProcessDataC2-----PublishDataC2

    I think you will have more predictable timing schemes in the last case, give every row it's own loop.

    Why do you need an RT read? The current setup does not read every 2.5 ms a can message. It reads every 2.5 ms all the can messages.

    What is the observed length of your FIFO? If this increases your listener is to slow and might cause timing hickups.

    Ton

  5. In the good old days, when I was sitting in the train a lot off the administration members would have a clipping paper, with news items about their work pasted into one paper.

    This can be done for LAVA as well, what if your boss isn't to keen on you visiting LAVA all the time?

    Use Tabbloid, that sends you an PDF news letter of RSS feeds.

    Here's a LAVA example.

    post-2399-1226659717.png?width=400

    Ton

    (attachment removed due to email address)

  6. QUOTE (Ton @ Nov 12 2008, 09:00 PM)

    Interpunction does not mean all in capitals, write sentences and questions, take the time to write a question.

    Write it in notepad (not Word or an HTML editor), save it. Wait half an hour, open and reread.

    Do you have clear questions, if so post them.

    QUOTE

    The code posted in the first post is two weeks old, what is the current state of your code?

    QUOTE (kmc @ Nov 13 2008, 02:31 PM)

    I AM SORRY I DINT MEAN TO ASK YOU FOR A FULL SOLUTION CENTER

    I Would like to explain what i have done first so that It would be easier for you to help me...

    1. As you see there are
    6 STATIONS
    .Each Stations perform various Tasks.Basically
    THE MAIN IDEA is to MONITOR THESE STATIONS.

    Just start with one station, duplication of code is easy.

    QUOTE

    THERE ARE STEPS TO MONITOR STATIONS

    1.AT FIRST WHEN OPERATOR LOADS THE PART THE PBX(switch) WILL GET ENERGIZED.

    2.10 MINUTE TIMER IS SWITCHED ON AT THIS STAGE.AT 9TH MINUTE THE TIMER STARTS FLASHING (THAT INDICATES THE OPERATOR SHOULD BE AT THE STATION)

    3.IF THE OPERATOR IS NOT THERE AT 10 TH MINUTE U GET AS FAIL(THE PART SHOULD BE SET ASIDE FOR 1 HR TO COOL)...THATS THE REASON WHY THE FLASHING PART HAS BEEN KEPT

    4.THERE IS A BALL KEPT ON THE PART...AS SOON AS THE BALL IS KEPT...ANOTHER 5 MINUTE TIMER IS SWITCHED ON...AT THAT TIME THE OPERATOR WILL NOTE DOWN FEW VALUES

    5.AT 5TH MINUTE ADJUST TO MAX VALUE,OPERATOR REMOVES PART AND RESET THE TIMER AND TURN OFF THE SWITCH

    I HAVE BEEN BREAKING MY HEAD FOR A REASON... :headbang: I AM EXTREMELY SORRY FOLKS...

    Go over the points you have posted step by step.

    Post the current code with references to every point mentioned here.

    Good luck

    Ton

  7. How wonderful it would be if such things could be arranged I am not aware of such a solution. Yours is the most elegant I can think off.

    Could you do me a favor?

    Save everything, close your project, then close the VI owning the XControl.

    I have an XControl locking everything up (LabVIEW 8.2 through 8.6), NI R&D refused the bug because I couldn't isolate it (That is their job, sorry).

    Ton

  8. QUOTE (Michael_Aivaliotis @ Jun 2 2008, 08:04 PM)

    RiotRiot ;)

    QUOTE (TobyD @ Nov 12 2008, 10:11 PM)

    Why?

    Sorry I thought you meant to. (sincerely)

    QUOTE (crelf @ Nov 12 2008, 10:27 PM)

    I only use the report button with spam. All other posts are somehow on topic.

    However I used a rather brutal tag http://forums.lavag.org/sensor-calibration-test-t12296.html&p=54305#' target="_blank">here, it is somehow a way to express my feelings on the post.

    Maybe I have crossed the line with that one, however I believe HH is a good tag. I had the feeling we are not homework helpers and had a policy on that. Tagging a post with Homework Hustler warns other people not to give a full blown solution, but learn them to fish.

    Ton

  9. QUOTE (TobyD @ Nov 12 2008, 09:28 PM)

    This doesn't seem to be working for me (Firefox 3.0 or IE8 on Vista) but I think it would be useful to guide people to use the same tags.

    I tagged a HH a few days ago and now the tag is gone - was that the poster deleting my tag, or are only admins allowed to post "negative" tags? Too bad you can't lookup the tag history for a given post since anyone can edit them.

    I deleted your tag.

    Ton

  10. Ashwin, have a look at the guidelines for this forum. Moreover learn to ask questions the smart way.

    I read through the topic, only the first post has a question about code, and has little no interpunction.

    You have not added any code, we have no idea what actually is your problem and current state of your coding.

    All these things together hold me back in helping you. LAVA is not a LabVIEW solution center.

    Ton

    Now where is the good coffee?

  11. QUOTE (sachsm @ Nov 10 2008, 03:31 PM)

    Does anyone know if it is possible to programatically access a xcontrols label text property. I have looked far and wide but cannot

    seem to find out how it is stored.

    Thanks,

    Please pardon my ignorance (I don't do XControls every day) but I thought we had to explicitly code every method we wanted to use for an XControl.

    Ben

  12. Hello every one!

    i wanted to hire virtual employees for web designing and SEO. Actually i am looking for whole virtual team. Because now it's become very expensive for our organization to recruit employees :( And we need reliable and quality virtual employees.

    We were prepared to post our requisite on freelancers’ site. But we have observed that it's very time as well as money consuming process. And also I heard that “The bigger problem on Elance, in my experience, is dummy projects. Some buyers post projects simply to get an idea of the cost or to try to find free work” So, what next?

    Our team comes out with conclusion to directly contact companies who are providing virtual employee services. But the question is "RELIABILITY and Hiring charges".

    We have got replies from some forums and communities. So, now we have one option company www.marketraise.com. it's nice.

    But we want best service provider with better package.

    Thanks in advance

    Sophia

  13. Hi,

    Are you using IMAQdx and IMAQdx

    If youre using the snapshot VI then probaly thats the problem. This Vi only allows you to get one image at a time (using a lot of time to do so). Perhaps a better idea is to use the low-level Vi. First open a session to a camera, then configure it (set the mode the continuous and set a large buffer), then start the aquisition proces. The camera will now send a continuous stream via DMA into the NI(ring)-buffer with the set size. Now you can use the GetImage VI to copy the image from ring buffer into a user image and proces it. The camera will stream

    Hi,

    Are you using IMAQdx and IMAQdx snap function?

    If this is the case probaly the snapshot VI is your problem. This Vi will only bring you one image at a time (using a lot of time to do so).

    Perhaps a better idea is to use the low-level Vi. First open a session to a camera, then configure it (imaqdx configure aquisition.vi). Be sure to set the mode to continuous and setup your buffersize, then start the aquisition proces (imaqdx start aquisition). The camera will now send a continuous stream of data via DMA into the NI(ring)-buffer. Now use the imaqdx getimage.vi to copy a image from ring buffer into a user-image and proces it. You can select the image you interrested in (buffer number, last (n) or next (n+1). If your processing is faster then your processing (for CCD normaly below 40ms) you can proces every image on-the-fly. If it takes longer you need to setup the image buffer large enough, and copy the image out on a lower rate using the buffer number.

    Dont forget to stop the data stream from the camera using imaqdx stop aquisition and close the reference at the end of your application.

    These two examples would be interresting: [Low-Level Grab Async.vi] and [Grab and Detect Skipped Buffer.vi]

    Regards Patrick

  14. Hi Dan,

    Because you are using a webcam (probaly cmos), I would advise you not just to compare the images pixel for pixel. CMOS cameras mostly have a lot of noise so you have illiminate that first. Make a so called kernel (n x n matrix) that calculate average value of those pixels. In IMAQ you can do this with a filter function.

    Alternative you can divide your image into sector (e.g.32x32 pixels) and check for differences using a threshold for each sector, then threshold on the number of changed sectors.

    Lots of succes

    Patrick

  15. You could build an auto-initialize function, in the first call you create and start the task.

    In succeeding runs you only read the DAQ.

    However I advice you to timed IO within DAQmx, so the timing is handled by the daqmx driver and not by LabVIEW.

    To do this you should create a clock on your 6259 of 5 ms, and do a burst read in LabVIEW of 1 sample, no timing needed the speed will be limited by the DAQ card.

    Ton (look at the NI examples for timed IO)

×
×
  • Create New...

Important Information

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