Well, first you have a comma right after your adin commands:
adin,p8,deadband ;minimum deadband 6"
should be
adin p8,deadband ;minimum deadband 6"
Also what processor are you using?
Also you have this statement:
Code:
count=(count+1)
1. you don't define count
2. count is a reserved word.
So you need to change the variable name count to something else(I recommend counter) and you need to define what type of variable it is:
Code:
counter var long
Then there is this:
Code:
insignal = irq1int,high
enable insignal
oninterrupt,calcdistance
What are you trying to do here. This isn't even remoetly valid in our Basic. Let me know what you are trying to do and I can show you how(if it's possible).
In Studio the PWM command has been changed to give more functionality. The old syntax:
Code:
pwm p12,duty,duration
has been replaced with the new syntax:
Code:
pwm p12,255,duty,duration
pwm pin,period,duty,cycles
This line and several others is using the wrong symbold for divide:
Code:
distance = counter\0.075 ;0.9 ms/ft=0.075 ms/inch
should be
Code:
distance = TOINT(TOFLOAT(counter)/0.075) ;0.9 ms/ft=0.075 ms/inch
You have a typo in this line and the divide symbol is incorrect:
Code:
deadband_inches =deadband\16
should be
Code:
deadbandinches =deadband/16
This line:
Code:
elseif
should be
Code:
else
This line
Code:
endsub
should be
Code:
endif
return
My guess is you are coming from a different Basic language.
When you installed 1.0.0.32 did you uninstall any previous versions first? Also I suggest you get the latest release from the news section in these forums.