Post 4-1-8 issues

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

Post 4-1-8 issues

Post by FFMan »

I upgraded my zbasic install the other day as in my previous post regards ubound I was advised one of the issues had been fixed.

Strangely my cruise control project then stopped being able to operate the pedal. The motor wines but does not move.

After much head scratching I down graded (uninstall, then install) to 4-1-8 and it once again worked ok. I then went to 4-2-3 and it didn't work, and then to 4-2-4 and the same issue.

Without more time tonight, I can only say the problem is something around PWM, and passing of the duty parameter perhaps. My debug logs running on both versions are identical, passing a parameter of 5 for bySpeedSet to

Call PWM(byAccel,bySpeedSet)

The pwm is opened using:-

Call OpenPWM(byAccel, snFast, zxFastPWM)

where snFast=500.0

I've run out of time tonight, any pointers much appreciated.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Post 4-1-8 issues

Post by dkinzer »

FFMan wrote:I can only say the problem is something around PWM, and passing of the duty parameter perhaps.
Which ZX device are you using?
- Don Kinzer
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

Post by FFMan »

meant to say in post - zx40n

I suspect the motor whine mentioned above is the PWM operating at the requested speed of 5% duty, and maybe in fact, in earlier versions of the compiler the 5% is being interpreted as a larger value. i'll run some tests along these lines this evening.
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

Post by FFMan »

Managed to resolve this but not quite sure how.

There definitely was a reproducible issue but I couldn't isolate quickly so I fixed the underlying issue of the requested pwm duty being too low to be useful and carried on.
Post Reply