Blog > Viewport command line utitility

Home Forums ViewPort Viewport command line utitility

This topic contains 4 replies, has 2 voices, and was last updated by  Anonymous .

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10702

    Anonymous

    Please help, I am having trouble with the command line utility. I am trying to use it to create a csv file of changing
    variable values. I had been using this utility a few months ago and it
    worked okay. I suspect some sort of windows update has caused this. I am using viewport version 4.6.2 with windows 7.

    Here is the batch file I am using (please excuse all the remarks):
    __________________________________________________________________________________________________________________________________
    REM VIEWPORT_D.BAT
    cd c:
    del d.csv
    cd Program Files (x86)
    cd Viewport

    rem /r1000 = sample once each second — r60000 sample once each minute
    rem /d40 = samples for 40 seconds — d3600 samples for 1 hour, d21600 = 6 hours
    rem .txt= save as text file, .csv save as spreadsheet file

    Viewport/f "C:Program FilesParallax IncPropeller Tool v1.2.6My ProgramsFLORIDA 2012 PROGRAMSBoiler temps viewport 12 27 2011.spin" /a "c: d.csv" /r1000 /d40
    cd c:
    cd batch files
    _____________________________________________________________________________________________________________________________________

    When I run the batch file all looks okay, the program loads, I see chaning variables on the dso view. After the 40 second interval
    the program just sits there in dso view with no changing variable. If I exit the program, no csv file is created.
    Thanks in advance for your help.

    Larry

    #11835

    Hanno
    Keymaster

    Hi Larry,
    Looks pretty good except for some spacing issues with the initial /f and the file in /a. Good luck.
    Hanno

    #11837

    Anonymous

    Hanno,
    Thanks for the response. I have made progress. The Original problem was my dumb fat finger error. The command line program now loads viewport and runs the viewport program, and does creat the csv file. My remaining problem is that the "/d" option never causes viewport to exit. Please help !
    Larry

    REM humidity.BAT
    cd c:
    del ddd.csv
    cd Program Files (x86)
    cd Viewport
    rem /r1000 = sample once each second — r60000 sample once each minute
    rem /d40 = samples for 40 seconds — d3600 samples for 1 hour, d21600 = 6 hours
    rem .txt= save as text file, .csv save as spreadsheet file

    Viewport/f "C:Program Files (X86)Parallax IncPropeller Tool v1.3My Programscell phone project 6 2 2012humidity 6 10 2012 a viewport.spin" /a "c: ddd.csv" /r1000 /d40
    cd c:
    cd batch files
    dir c:

    #11836

    Hanno
    Keymaster

    Hi Larry,
    Glad you’re mostly successful! I’ll figure out the /d issue.
    Hanno

    #11838

    Anonymous

    Hi Hanno,

    Is it possible to download an older version of viewport? I think the version
    That worked with the command line functions was V.6.2 (October 2011). This would give me a temporary fix until you have time to look at the problem.

    In order to simplify trouble shooting, I created to simple programs to demonstrate the
    Problem.

    The batch file loads viewport, viewport runs for the time specified in the “d” option and
    Then stops running. It does not shut down viewport. If I manually shut down viewport a save file is created.

    Here is the batch file

    REM viewport_test.BAT
    cd c:
    CD BATCH FILES
    del ddd.csv
    CD C:
    cd Program Files (x86)
    cd Viewport

    rem /r1000 = sample once each second — r60000 sample once each minute
    rem /d40 = samples for 40 seconds — d3600 samples for 1 hour, d21600 = 6 hours, 36000 samples for 10 hours
    rem .txt= save as text file, .csv save as spreadsheet file

    Viewport/f "C:Program Files (X86)Parallax IncPropeller Tool v1.3My ProgramsTEST AND STUDY PROGRAMSTESTING NEW PROP VIEWPORT 7 27 2012.spin" /a "c:BATCH FILESddd.csv" /r1000 /d40

    cd c:
    cd batch files

    Here is the viewport program:

    CON
    _clkmode = xtal1 + pll16x ‘Set clock to 80MHz
    _XINFREQ = 5_000_000 ‘Crystal is 5MHz.
    VAR
    LONG counting, COUNTINGPLUS

    OBJ
    VP: "CONDUIT"

    PUB counts
    vp.config(string("var:v1,v2"))
    vp.config(string("start:dso"))
    vp.config(string("dso:view=[v1,v2],timescale=10ms"))

    VP.SHARE(@COUNTING,@COUNTINGPLUS)

    repeat ‘COUNTS TO 20 WITH PAUSE AT ZERO
    waitcnt (20_000_000 + cnt )
    if counting==1 ‘PAUSE AT ZERO
    repeat 3
    waitcnt (20_000_000 + cnt )

    waitcnt (20_000_000 + cnt )
    COUNTINGPLUS:=COUNTING+100
    counting++
    if counting == 101
    counting~ ‘ resets counting variable to zero

    Thank you for your help.

    Larry

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.