Jump to content

fbrandeber

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Posts posted by fbrandeber

  1. Hi,

    I have created an application that will become an executeable. I currently have 8 sets of values that I would like to put in an init file, and loaded each time the exe runs. I would like it to be a textfile, so it could easily be edited by the user, but that is not a requirement at this time. The main thing is that the user can change any of these values and have them restored after a restart.

    I currently have the following to init:

    A small tab delimited text file

    Two path statements

    A small integer array

    A small floating point array

    A boolean

    Two single integers

    I would like to know what is commonly done for init files, and how best to do this one. My ideas so far are messy. :-)

    I can change the application to suit, no restrictions there that I know of. It is a custom monitor and logging app.

    I did a search of this part of the forum, but did not see anything pertinent. This seems like the place it should be.?

    Fred

  2. I am working on a LV runtime system to monitor a remote device with only a phone line to access it. I would be particularly interested is examples of doing dialup in a LV8 pro generated runtime program... and the answering code. Currently all my user seems to want is to look at the LV8 screen remotely, speed does not seem to be a big issue. I have not done any remote communication with LV before. Currently this is expected to be done exclusively on Windows machines, so platform is specific. I would like to use the modem built into the machines used. The remote machine is expected to be a newly purchased laptop which I now have.

    ALternate ideas using dialup would also be appreciated, such as just accessing a data file. I am fishing here, because my skimming of this board and other sources has so far produced very little. Examples would be most appreciated !

    Best regards,

    Fred

  3. There's a lot going on here that perhaps you haven't considered. When your app is an exe, how will you store the settings so that they can be recalled later? You probably need to save them to a config file and then read them upon startup. Also, you need to decide on a storage mechanism of your variables that is internal to your program. You can use a local variable as stated to read the array but then how do you pass it throughout your app? Wires and shift registers come to mind but you might want to consider functional globals. Here is a link to a post I made way back that has a working example code of what you might want to do:

    http://forums.lavag.org/index.php?s=&s...post&p=8956

    Notice that, once the configuration panel is closed, the configuration is available from anywhere in the program via the functional global. If you look inside the functional global you will see a state that handles saving of the configuration. Here is where you would implement your preffered method of configuration saving so oan executable can read it. This design pattern may seem trivial but it works.

    Michael,

    You are correct, I had not considered that, thanks for the timely post! :-)

    Slowly I learn...

    Best regards,

    Fred

  4. The simplest way (if you want to read it any time) is to create a local variable of the array. (by right clicking on the control, choose 'Create', then Local Variable). Then you can right click and 'Change to Read'.

    Interestingly, I had tried that, but because I had hidden the "index display", the option was greyed out, except at the very top edge of the object... sigh.. as I found out much later. Thanks for the encouragement!

    Fred

  5. Is there an initialization stage where the user enters these device IDs, and then from then on you check this array (which implies the user can't change it now)?

    YES, that is what I was trying to say... Still learning to communicate...

    Currently I have a "maintenance" section of the front panel with this in it.

    It will only get changed when a box or chassis changes...

    I am guessing I won't have any trouble getting this into my .exe, but have not tried yet.

    I have yet to seriously tackle the process of generating an .exe, with all its' details.

    My few trials, while successful, made it seem pretty non intuitive to me.

    Been focused on getting the program functional first.

    It is essentially a data logging application, catering to a special scenario.

    tnx,

    Fred

  6. that's true :yes:

    Not sure I understand all that, but I naturally changed the low number to 0 right away. The problem I am having is that I need to read that array periodically... I cannot seem to do that, seemingly because the only time the array is seen is when there is a value change.. So much for my specification document.. sigh... How do I handle that?

    Fred

    PS. I also hid the up/down buttons, to stop the frustration factor if a duplicate is in the way of the desired setting.. :-)

  7. This solution does not fit his needs as he has described. If I understand the question correctly. What you are saying is that you want to use a while loop to process something then wait ten minutes and process again but you want to implement a sort of emergency stop were the user may not be able to wait the ten minutes. if this is the case i would suggest that you use JP's suggestion.

    Thanks to ALL! :-) I have generated a LV8 version of my interpretation of JP's suggestion and attached it. It did not occur to me until later that I was given a requirement this does not fill easily. Perhaps someone can help me implement it. In my example I just put a flashing lamp for the function to be performed. It appears to work fine, but I am also supposed to perform the function(collecting data from several acquistion boxes via USB) as soon as the program starts, sort of a baseline. . . Right now the only way I can think of to do that is put a copy of the elaborate function outside the loops, so it runs once immediately. Perhaps someone can point me to a better way?

    Thanks again,

    Fred

    :unsure:

    Download File:post-4712-1154577090.vi

  8. Fred,

    Sounds like you need to modify your project file from the Project Explorer window to add the files you are interested in to your project. App Builder only lets you include files in your build that are in your project. So from Project Explorer right click on My Computer and choose Add File or drag and drop the files under My Computer or choose Project>Add to Project, I'm sure there are some other ways too and you might want to check on help topics about adding files to the project.

    Kennon

    Kennon,

    Thanks for the push in the right direction! :-)

    Fred

  9. Being a newbie, I have run into a problem I don't know how to deal with. Having created an app. without the project manager, I created a project via the executable wizard. This has worked fine on simple vis for me. However, when I try this with my first application with subvis and data files I hit a problem. Following the "building a stand alone application" instructions, things are okay until 5c. I have no files except my main vi listed in the project files tree. I see no way to change that. The files are in the same folder as my main vi. I have looked around in this section of LAVA, and NI's support section, no luck so far.

    I am using LV 8.01, WinXP, and have modest experience with LV. I could sure use some clues as to whether I went wrong or what. I would like to make a decent attempt at creating an .exe, before I call NI engineers. This has me stalled.

    Fred :headbang:

  10. Fred,

    Are you sure you are adressing the port correctly? Also, are you sure that there is no other software that is blocking NI from accessing the port?

    I might suggest this as a sanity check. Without having Labview open, try communicating with your RS232 connected device with Hyperterminal. If you can't get that to work, then Labview would probably never be able to see anything at the port either.

    After writing the above, I checked the NI website and found the following statement about the demo:

    Maybe this is your problem?

    -Pete Liiva

    Pete,

    Thanks for the info! :oops: I sure missed that, I fully expected "fully functional" to include the serial port functionality.. sigh. Just to reiterate, I have used a windows program designed for it to access this device, so cable and port and device all work fine.

    I located and installed without any apparent error the serial driver ver 1.71 ..... No change in the error message from the advanced serial vi... :-( I am beginning to think it is deliberatly disabled somehow.. I wish they had made that clear up front !

    THANKYOU all, for you kind assistence! I had hoped to practice with a real world device, perhaps I should have known better. Guess I will just have to wait until our purchase goes through.

    Best regards,

    Fred

  11. If you post the negative number, we can have a better idea of the problem. You can also go in the Help Menu and enter the negative number under "explain error".

    Did you configure the serial port? port number, rate, data bits, parity, etc...

    JLV

    Yes, as I mentioned in my post, I entered the parameters given in the device manual. I have tried variants with no peceptable effect. The vi does not seem to be able to access the port, for no apparent reason I can see... sigh

    -1073807339 is the number, which seems to equate to "timeout before completion", which does not tell me much. I am expecting the "express serial r/w vi to access my machines' serial port.. I hope that is what is supposed to happen. Lots of things have changed in the 12 years I have been away from labview! I used to use something similar without difficulty in the early versions of LV.

    Fred

  12. Hi,

    Calling the express r/w serial vi and entering setup parameters, followed by clicking on run, immediately gives me and error message window with no message. It just shows a large negative number, which appears to be coming from the error out port on the init subvi. The serial device, and cable works with a windows program written for it. A windows serial port monitor program and my serial port breakout box both indicate the express serial vi does not access the port. The machine I am using is a hp750n, software is LV8 30 day demo. I am a newbie, hope someone can help me over this bump in the road to working with LV8. :headbang:

    Fred

  13. Hi,

    Calling and putting in parameters in the express vi, and clicking on run, results in and immediate error with no error message, just a large negative number, which appears to come from the error out port on the initialization vi. I am new to current labview, used it over a decade ago. Hardware I am trying to access works with a windows program written for it. Windows serial port monitor indicates, as does my port breakout box, that the vi does not access the port at all.

    Machine is an hp750n Pavilion. I am running the 30 day demo package of version 8.02. I am hoping that someone can push me over this bump in the road to using a current version of labview. :headbang:

    Fred

×
×
  • Create New...

Important Information

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