Results 1 to 5 of 5

Thread: [RESOLVED] [2005] Scriptable Application

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,950

    Resolved [RESOLVED] [2005] Scriptable Application

    I've recently completed an app that controls a heap of test equipment (that does board testing). Using my App, the user sets up tests for different voltages, frequencies, temperatures etc, the App drives the test equipment over GPIB and also captures/plots the results. The user can access the PC using VNC, which saves them having to turn up at the lab to switch the oven temperature over, restart it, view the results or whatever. This all works great.

    But... the various tests are currently hardcoded and the user just chooses which ones to run in sequence (from checkboxes in a ListView). It would be really neat to be able to support user written 'scripts' that would look something like this...

    For Temp = -40 to +140 step 20
    For V1 = 2.5 to 3.5 step 0.1
    For F1 = 1M to 100M step log 1 decade
    Measure Vout
    Next F1
    Next V1
    Next Temp
    Plot (x=F1,y=Vosc,z=V1) etc.

    I can hardcode each such test and add it to the existing list of tests, but this needs "me" to do it. Since I effectively have a library of subs/functions that does all the necessary stuff, it would be good if my App could read/run a script. Any suggestions how I could make my App's inner functions scriptable? Users could then code their own tests and I dont need to be summoned every couple of hours to write a new one. (Originally I was told there was a well defined fixed set of tests, hence I assumed hardcoding them was fine. So I'm trying to retrofit a new feature that wasnt requested, yuk!).

    I was thinking of adding an edit window and writing a parser which checks the script and then calls the various subs, but this is like writing a compiler and needs error checking galore (lot of work). To avoid exposing my code, I could also create DLL's which the user then calls, but there would be no error checking.

    Do I need to do all this or is there a better way? Any advice appreciated.
    Last edited by Bulldog; Dec 31st, 2006 at 10:16 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width