Jump to content

ShaunR

Members
  • Posts

    4,850
  • Joined

  • Days Won

    292

Posts posted by ShaunR

  1. On the shown of the actual VI how is runs, sequences and the Error 7 Occured.

    The Error 7 only allow me to click on "Continue" or "Stop"

    It required me to click on "Stop" and manually click on the "Run" of the .vi then allowing me to have the .vi to run the sequences all over again,

    allowing it to Create the NEW date folder (E.g. 100824) and transmit text data into the folder.

    where problems lies that if possible shouldn't have the Error 7 to appear but it continuously runs on from the 1st sequences all over again

    to produce the (different output each day falls - output for each day is different values)

    :frusty:

    I gave you the answer to to that in my first post. (You can press continue by the way).

    Check the VI properties of all your VIs and make sure this is unchecked.

  2. OK. I get it.

    couple of things to look at.

    1. What is the 100823? If it is system time (like in excel etc) I'd expect that to be 40413 for 23/08/2010. Whereas 100823 would be 15/01/2176.

    2. From your images. You show 100823 with no directories afterwards. Then you show after the roll-over 2 extra directories (albeit without the 100824). Could it be that the data you are expecting in 100824 is in fact in one of these and your program has skipped when saving for this particular date?

    3. Is this the only date it happens on? Does the software quite happily save as you expect but on this particular date it doesn't? You show many directories previously and after the 100824.

    4. Looking over the history of results. there are many "gaps" in the data record 100722 suddenly jumps to 100820 (98 days?) , 100531 suddenly skips to 100601 (70 days?) etc. What is the reason a file wasn't saved between those periods? Could it be a case that you just didn't receive any data therefore there was nothing to save?

  3. I wish I had an excuse to play around with this, it looks sweet. :thumbup1:

    You need an excuse? I thought it was our nature to play with this sort of stuff biggrin.gif

    I concur. Next time I ask myself whether or not to choose a database implementation or simple binary files to store data, I'll try to find some time to try these first...

    Keep it in your palette and I'm sure you'll think of something. wink.gif

  4. Currently working on a project with the Requirements below.

    Currently about 80% of the project is done as far.

    Requirements:

    Step 1: Open a .vi, Run when Opened. It reads the PC system date/time and create a new folder of the current system date at a specific directory. (E.g. 25 August 2010.) Folder: 100825 >>> Completed

    Step 2: After the Folder is been created, it uses TCP/IP Connection to transmit text data from another computer into the created folder. With the folder containing the text data. >>> Completed

    Step 3: With the data collected, it reads the text data in the folder according to the current system date 100825 to produce the output graph chart. >>> Completed

    Step 4: The .vi runs continuously, so is the PC system date/time. Running at the time reaches 2359hrs, 100825 ---> changes to a new date, 0000hrs, 100826 >>> Completed

    Step 5 (Error Occurs): With a new date/time falls, Error prompt out. The running .vi unable to return back to (Step 1) but stops at (Step 3) with Error occurs. :frusty:

    Need help on the (Step 5) issue.

    Been try quite a number of times of ways to solve yet unavail.:(

    Is there anyone out there able to create a simple .vi that containing with the requirements above?

    As need that for help as for reference.

    Regards,

    david.

    The Step 1 to 5 sequences keeps on running from Step 1 > 2 > 3 > 4 > 5 over and over again whenever a NEW date falls.

    :frusty:

    Regards,

    david.

    If you mean when there is an error condition you are getting an error dialogue when you shouldn't be, then you probably have an unwired error out cluster (or none at all) and "Enable Automatic Error Handling" is set in the offending vis "Execution" properties.

  5. I understood that part (my snippet uses the transaction query VI), it turns out that my problem was that I was querying the database for all records at the end of all the INSERTs. Is there any way to speed up a SELECT?

    Possibly. This release basically does a "GetRow" and has to iterate for each row. There is another method, but it isn't implemented yet. (Still trying to figure out how to do it....if it is possible in LV).

    Do you have a real-time target that uses ETS?

  6. This is wonderful. I've begun implementing it in a current project and need to ask about the Query Transaction function.

    I was excited to read this comment because one of our current systems takes forever to write to our SQL Server DB. (~30 seconds. I imagine it's executing one SQL INSERT for each step it's reporting.) So, I thought I'd test this in SQLite:

    As I played with it I came up with this to see the effect of larger SQL strings:

    I've tried each of the locking modes (immediate, deferred and exclusive) but it's taking almost three seconds to complete only 5000 SQL INSERT statements. This is not as fast as the documentation suggests.

    What am I doing wrong?

    Its not the number of statements. Its the number of "TRANSACTIONS".

    When you use the "INSERT" VI in a for loop, each iteration is 1 transaction. Additionally, the insert vi opens the file before the transaction and closes it afterwards for a slightly safer implementation. The insert is for convenience and a bit more safety.

    If you want blistering speed. You need to use the "transaction query.vi". this will wrap your Insert statements in the "BEGIN...END" and execute all the statements as 1 transaction.

    With the test below. I achieved 10,000 inserts in 609 ms.

    • Like 2
  7. So far nothing is working. I have tried Shaun's approach but I am not seeing any events in my top level VI. I attached the simple example that I have been playing with.

    You are not generating an event.

    I've had a play and it seems that the panel close event isn't really an "OnPanelClose". It is only an event generated by clicking the close button. frusty.gif That's not really what you are after. To also include a boolean you would have to attach to the on-value as well.....too much effort. Might as well put an event after the while loop. shifty.gif

    Back to the drawing boardoops.gif

    Perhaps the 'VI will be purged' event is something you want?

    Ton

    I never had a lot of luck with it (maybe because I don't fully understand it). But sometimes it worked, sometimes it didn't.

  8. Thanks Shun. This is close but it still requires knowledge of the subVI. This requires that the calling application knows the names of the controls of the subVI for processing. Overall this is a reasonable work around but ultimately I am looking for a truly generic solution which decouples the top level VI from the called subVIs.

    All I want to know is when the subVI exited. I don't want to know anything about the internals of the spawned VI nor do I want to require the spawned subVI from having to do anything special to inform the caller that it has exited. It would seem reasonable that the caller should be able to be informed of specific events of the spawned VI.

    I do appreciate the suggestions though. And this callback solution could be useful for other tasks.

    The example does, yes. Because you don't know what controls maybe on the front panel. But ALL vis have a generic on-close event :) So don't need to know anything about the sub VI. You just inspect the reference when the event comes in to find out which VI closed.

    So the install callback just becomes:

    Haven't been through it thoroughly and perhaps not as "clean" as you would like (I suspect you were expecting to just select it with 0 programming). But better than nothing eh?

  9. Thanks Shun. This is close but it still requires knowledge of the subVI. This requires that the calling application knows the names of the controls of the subVI for processing. Overall this is a reasonable work around but ultimately I am looking for a truly generic solution which decouples the top level VI from the called subVIs.

    All I want to know is when the subVI exited. I don't want to know anything about the internals of the spawned VI nor do I want to require the spawned subVI from having to do anything special to inform the caller that it has exited. It would seem reasonable that the caller should be able to be informed of specific events of the spawned VI.

    I do appreciate the suggestions though. And this callback solution could be useful for other tasks.

    The example does, yes. Because you don't know what controls maybe on the front panel. But ALL vis have a generic on-close event :) So don't need to know anything about the sub VI. You just inspect the reference when the event comes in to find out which VI closed.

    So the install callback just becomes:

    Haven't been through it thoroughly and perhaps not as "clean" as you would like (I suspect you were expecting to just select it with 0 programming). But better than nothing eh?

    Oppps. Posted on wrong thread...lol.

  10. You can attach your own "user event" on launch by using a callback function. I've only ever used it to hook the other VIs front panel controls' events, but it should be possible to hook the on-close event. You are still generating a User Event, but as the callback is attached to any VIs you launch yo'd only have to do it once, and you wouldn't have to write any code in the VI your are trying to hook.

    Callbacks

  11. Without requiring the spawned task (subVI) to post a message to a queue, can the top level application that spawned the task detect that the subVI exited? That is, if the top level application opens a reference to a vi (using a VI template) and then runs it. When it runs it it doesn't wait for the VI to complete so it truly spawns a new task. I tried catching the spawned task's close using the Application Close and Panel Close events but neither detect the close. I know that I could have the subVI generate a user event or post a message to the queue but I was trying to catch the exit in an autonomous manner. I wanted to avoid having to pass anything to the subVI (the user event reference or queue name) as well as avoid the spawned task from knowing that it was invoked by another VI. In C when you fork a process you can catch the signal when it exits without the spawned task needing to do any special processing on it's exit. It would seem like we should be able to do this but so far I haven't found it.

    Check the "VI's in memory" list?

  12. It seems that the amount of work involved isn't proportional to the price you're suggesting. Why so much? I can't afford it :(

    If it is full blown implementation then it is a lot of work. I think, however, most people only need/use the basics. I just hope its not ADO or .NET.

    • Like 1
  13. Too bad they don't have something that goes the other way.

    I wonder how well this actually works.

    I assume its an offshoot from their embedded tool kits (you can't run LV on for example an ARM processor). where you write stuff in LV and it generates the C code which you then have to compile using a C compiler. The other way round would be awesome.

  14. I just realized I'm about to hit 500 posts on LAVA. I would have probably preferred if #500 was a deep treatise on some esoteric feature of LabVIEW that will change the programming world as we know it. But we all know that ain't happening anytime soon. Maybe post #1000...

    Cat

    Do we get cake? biggrin.gif

  15. Hello there...

    Actually i doing a thesis about "Automated Car Parking System by using LabVIEW" ..

    i have to design a system the can controlled a car in and out, counting and then will know have many parking left,

    to make a driver feel convenient..

    I have facing a problem to know how LabVIEW can detect physical system like sensor. and through the sensor can be a counter to counting a car in car park./

    Hopefully, anyone which have a knowledge can share with me...shifty.gif

    Thank you..

    Labview is designed for interfacing to sensors.

    What is your budget?

    How much time do you have?

    Can you build simple or complex electronic kits?

    Can you program micro controllers?

    Can you use a multi-meter?

    Don't be frightened by the questions. I'm just trying to get an idea of your skills.

  16. Hi all,

    Where can I find the internet tool kit for LabVIEW 8.6(Internet toolkit 6.0.2)? I searched in NI site. But I cannot able to find it? Could you please help me for finding this?

    I have 2010 toolkit. But no 6.0.2 for 8.6 version of LabVIEW

    Thanks in advance,

    Suresh Kumar.G

    I believe 6.0.2 is the one shipped with LV2010. Its for versions 8.6 and above.

×
×
  • Create New...

Important Information

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