Blog > Re: Viewport command line utitility

Home Forums ViewPort Viewport command line utitility Re: Viewport command line utitility

#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