Issues with WSM

steska

New Member
Hi all, only recently did some basic projects with picaxes and do try to understand the VSM simulator but do have some issues with it.

None of the programs that I do get to “run” on the VSM will not go “step by step”
unless I put breakpoints on each line.
It’s not needed on the samples, where do I go wrong?

On each Pause I do have to click (pause x/100*2) to get to the next line or hit “run”
to get to the next breakpoint.
The same applies to sample programs.
Didn’t see this documented anywhere, took me a while to figure it out.

Also a program that runs on a Picaxe simulator will not work on VSM

On line - let Pins = %00000000 did try let Pins = %00000000 +0
as suggested on a different thread for Let Dirs=%.... but with no result.

Any work around it?

Code:
 Start:
 
      let Pins = %00000000
       
  
 Check1:     
       let b0 = pins & %00001111
       if pins  = 0 then Check2
       gosub Sendit1
       
       
 Check2:
       let b2 = pins & %11110000
       b2 = b2 / 16
       if pins = 0 then Start
       gosub Sendit2
       
       pause 3000
       goto Check1
       
 Sendit1:
          for b1 = 1 to b0
          high 0
          pause 200
          low 0
          pause 500
          next b1
          pause 1000
          return
                 
 Sendit2:
          for b3 = 1 to b2
          high 1
          pause 200
          low 1
          pause 500
          next b3
          pause 1000
          return
Cheers, Steve
 
Last edited:

Technical

Technical Support
Staff member
To run your simulation, instead of using the 'run' button, click the 'pause' button instead.

This will automatically start the simulation and break on the first line of the program. To single-step then use the 'step' buttons on the BASIC program display panel. To view any sub-procedure line by line make sure you use the 'step into' button rather than 'step over' button

Any 'pause' will still simulate in step by step mode. So when you get to the pause line there will be a delay when you can't do any more stepping (whilst the pause command delays for the pause value).

Your program seems to work as expected for us (v1.0.2, which fixes the bug you refer to). Are you confusing pins operation , when on left of = it is setting the output pins, when on the right it is reading the input pins.
 

steska

New Member
Had no problem with "Pause > Step by Step" but the code snippets started with a Pause
and I expected it to jump on first click, my mistake.

"Your program seems to work as expected for us (v1.0.2, which fixes the bug you refer to)."
Didn't realize a new version of VSM were already availible, thanks,

"Are you confusing pins operation"
No, want to use two BCD (thumb-switches) to set two different and separate time periods.

Works great, thanks for so prompt answer, Steve
 
Top