Jump to content

jpdrolet

Members
  • Posts

    367
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by jpdrolet

  1. And obviously, the next question is, could you exchange an old VI for a new one of the same name? And finally, is there any reason that you could not do this programmatically? Might prove to be an interesting way to push updates out to distributed executables. It would also be a pretty serious security flaw....

    I think I'll go experiment a bit. :lightbulb:

    3269[/snapback]

    If I remember correctly, you can rip the internal LLB into file VIs using the library manager, make any replacements/wrapping and rebuild the application.

  2. another question:

    i have some self written tools (like automatic tunnel wiring wizard, etc ..) but all these tools lack of the possibility to use them directly from the tools menu for the frontmost vi. 

    2927[/snapback]

    Back on topic, I think that what you need to determine from which VI Tool menu a tool was launched is the Application property App.MenuLaunchVI. It returns the name of the launching VI. Use that name to get a reference.

  3. Yes I am aware of that, but the fact remains that the Match String function does not differentiate between a hexadecimal input and a string input. One would expect that when looking for a hexidecimal string, the string would be matched exactly as it appears.

    3002[/snapback]

    The wires on the diagram don't have any formatting information from the control which data comes from. That's perfectly alright because the actual content of a control is not affected by how data is displays. I wouldn't like if a number was modified by the number of digits of precision it is displayed on the control... The same applies to string display. There is no so called difference between hexadecimal and string input. That's the same data with different display format for the user's eye only.

    However, if you want to use the string as it is displayed, you can use the Text.Text property:

    post-447-1103031980.gif?width=400

    This property is the string content as it is displayed in the control. This is the exact formatted content, including the space separator every 4 character.

  4. Anti-spam campaign put on hold here

    The numerical internet address of the site has also changed. This is likely to be in response to spammers who have reportedly redirected traffic from their sites back to the Lycos screensaver site.

    Net Wars! A New Hope and

    Spammer Strikes Back

    Now playing in a computer near you.

  5. ...

    Just as an aside, would it not be more convenient to just have the user type 'NaN' into the control? That's three key strokes as compared to two and a lot less programming effort.

    ...

    2764[/snapback]

    Customer wish... :rolleyes:

    By the way, it was asked that only Delete would be used but it is already a standard key used to edit the number. That would be confusing...

    Thank you very much hfettig :thumbup:

  6. It's not just the event structure that doesn't allow selection of array elements, but all property/methods applied on array elements fall into this topic.

    It it an intended behaviour. Since at designtime you don't know how many elements will be in the array, and at runtime the number or elements can change, you would get problems when wanting to change the property of element that doesn't exist anymore (how would you create an event on the 25th element of an array when your array just hold 20 elements????)

    On arrays you can just act on the properties/methods of the element type. not the elements itself. The events (e.g. Value Changed) react on the elements not the types - so not possible for array elements.

    Didier

    2761[/snapback]

    But still, there are controls in the array and they could generate UI events. You can type in or click a control even if the array is empty. You can know which element is currently edited (a specific property for that would be convenient) so you could act on this element according to the event..

  7. I want to replace the value of a numeric control (inside an array of clusters) with NaN when the user hits Shift-Del. The event structure (LV7) doesn't allow to select controls inside an array. Is that possible?

    Otherwise, the solution I see is to display array elements in a separate cluster and copy/replace element as the index changes.

  8. That's an easy one. The brute force solution:

    post-447-1100786915.gif?width=400

    If you give more thought to the problem, you search for a number N divisible by 7 and (N-1) is divisible by 2,3,4,5 e.g.60. It has the form 60*n+1 so you find it with this simpler code:

    post-447-1100787423.gif?width=400

    :!:

  9. INPUTS = h and p

    OUTPUT = a

    ill use this syntax to move across a long constant array table.

    this is a Formula Node like C++ Programing

    ----------

    if(h=40) {

    a=1;

    }

    if(h=50) {

    a=9;

    }

    if(h=60) {

    a=13;

    }

    if(h=75) {

    a=17;

    }

    a=a-p;

    -------

    WHY THE OUTPUT IS ALWAYS THE LAST a VALUE?  should i use switch-case if i have... can some post an example?.....Thx for ur help!

    -------------------------------------

    By Sir ZRX!

    2641[/snapback]

    The correct syntax to test an equality is

    if (h==75)

    .

    As written,

    if (h=75)

    assigns 75 to h and tests its value to TRUE, since it is different from 0.

    post-584-1147876043.png?width=400

  10. I was wondering what the best method to execute a sub-function at scheduled times of the day (ie. 4:00:00 AM and 4:00:00 PM)

    My program consists of a timed-loop structure counting different machine states, and it needs to log the data to file and restart the count twice daily.

    The way I have it now, in every loop cycle, it checks if the time = 4:00:00.  However, I doubt this is the best way to do it, and I would greatly appreciate any suggestions.

    -Phil

    2472[/snapback]

    Polling is fine. However, be careful when comparing to exactly 4:00:00 e.g. if the system is busy and the loop only execute at 4:00:01 (skipping 4:00:00) , you'll miss the condition. Maybe time >= 4:00:00 is better.

    If you do not want to poll, you can have a parallel process generate an event when it is time to log. For example you wait for a dummy notification with the timeout set to expired at 4:00:00. There is no polling and when the wait times out, execute your log.

  11. The newly found ini settings

    allowmultipleinstances=True

    allows to run multiple instances of LabVIEW or Run-Time executable.

    This has a side effect when the application is associated to a file extension (a pet topic of mine).

    Without this setting, when a file extension is associated to a LabVIEW application, one could open the file within the application by reading the command line. However, double-clicking on a file didn't have effect when the application was already running. A second application was needed to have the same effect (see link above).

    With this setting, now one can easily open one instance of the application each time an associated file is clicked on. :!: :thumbup:.

    However, it is often desirable (and memory efficient) that all files being opened in the same application space. In this case the application can be set to detect a TCP Server when an instance is launched. If the TCP Server doesn't exist, the application starts normally, opens the file on the command line and starts the TCP Server. However, if the TCP Server does respond (an instance is previously running) then the file on the command line can be sent to the running instance via TCP and opened in the first instance (the second instance then quits).

    That does have the advange of

    0) handling files without the need of a second application

    1) (yet to test) the user can select multiple files in the explorer and open them simultaneously. Using a second launching application, this one needed to be multiple instanciated for this to work. It was not possible with a LabVIEW launching application, hence the use of a vbscript in the above link.

    At last a satifying full G solution! I'll set an example soon.

  12. Aha,

    thanks a lot,

    in the mean time I already rewrote it using an ini-file.

    I still think the application builder should warn you when using such unavailable methods.

    Manu.

    2329[/snapback]

    In fact it is not known until run-time that the referenced VI is or isn't in a run-time environment. In principle your application can legally invoke this VI method for a VI that is opened in a development LabVIEW environment. An application can't execute the VI method by itself, but can invoke it in another development environment.

    post-447-1097773441.gif?width=400

    This question should be adressed in the FAQ...

    Edited to add picture

  13. That's the way I always did it... load+open splashscreen, load main app dynamically, end splashscreen.

    This is a much easier method. :thumbup:

    Another question rises up there: how do you know when the splashscreen has to close? Is it just a timed loop, or do you have any sync (occurence or something else)?

    2197[/snapback]

    The simplest implemetation of a splashscreen is to put it as a TLVI in the build app. It is not necessary for it to load the main application. For beginners they don't have to go in the details of opening VI references and the unavoidable FAQ of path changes in executables ;)

    However I agree that loading the main application is a more flexible solution to control how your application loads and runs.

    *Edited for tags

  14. Can you elaborate on this a little bit more? I'm not following. Is this a hidden feature? Also, this isn't really a splash screen but an About screen right?

    2187[/snapback]

    It is a documented feature of the application builder. When a VI beginning with About is found in the internal library, this VI will popup when the About builtin menu is selected. It is often the case that the splah screen is the same as the About screen so if you want this About VI to be displayed at startup, include it as a Top Level VI (TLVI) in the build because all TLVIs are opened and run at startup.

    If you want different screens for splash screen and About, include the splash VI as TLVI and About as Dynamic VI. The About VI must be idle to be displayed so it can't be part of the running hierarchy (it is run dynamically).

    It has been suggested that the splashscreen loads the main application. It is not necessary since if both splashscreen and main VI are TLVIs, they'll load and run simultaneously at startup. If the splash screen is lightweight and opens quickly, it will also prevent the "loading..." screen to appear when the main application takes too long to load and open its FP.

  15. hello everybody:

    I have a question, that is how to create a starting picture(logo) before we open a labview

    program? that is same as a logo when we open any application program.

    thanks :blink:

    2183[/snapback]

    In a built application, the splash screen can simply be added as a second modal top level VI. Name this VI with the prefix "About " and this VI will also replace the LabVIEW Run-Time screen when the menu item About... is selected,

  16. I'd like to advertise my products on BabVIEW - How do I create pop-ups? Are you going to add pop-up Support? How about HTML while you're at it ;-)?

    Great Idea, I had a professor tell me his students took my 'Robust TCP-IP' code from Labuseful and actually did audio chat.

    2149[/snapback]

    Actually I planned that users could upload and run VIs on other users' computer. You could do funny things like popups, opening CD trays when someone type a certain word, or a platform independant spambot. :laugh:

  17. If I'm allowed to make the first comment...

    A List of online users would be nice, actually you write into the dark, possibly reaching nobody.

    Didier

    2051[/snapback]

    Of course it needs a lot more features. User list and connection/deconnection messages are the first to come to mind. Then multiple chat rooms and personal messaging...

    That was a proof of concept, something I started to wire from scratch at 10PM and was working by 2AM. Could it be achieve that fast in any other language? :thumbup: :beer:

×
×
  • Create New...

Important Information

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