PE 6.0.6.3 simulate issue

johnnewyork

New Member
Hi Guys, I have a problem with the new simulator 6.0.6.3 (BETA), maybe you could help me. I recently installed the new PE 6 tools. I love the new interface and features, it is very easy to use. I really like the changes and new features.

For fun I loaded an older working project and tried the simulate feature. I am having problem with the ASCII and RAW serial inputs.

I get the message "ERROR - unknown command in Simulate.ProcessNextLine - case_1". This code runs fine on the 20M2 Picaxe once downloaded.
input string ASCII: $I1 or RAW: "$","L","1" the simulator crashes at either CASE statement shown below.

The first token is parsed but when the second is attempted. Thank you for your help, its probably something stupid on my part.

I tried: PICAXE-20M2, PICAXE-08M2


Code:
sertxd ("Picaxe online", cr,lf)

top:
serrxd b0,b1,b2 ' example: input  "$l2" include "" for simulator

if b0 = "$" then
{

	'parse the token:B1
	select b1
	   case "I" , "i"
 		sertxd ("I: ", b2, cr,lf)

	   case "L","l" 
 		sertxd ("L: ", b2, cr,lf)
      endselect
}
endif
goto top
 

Technical

Technical Support
Staff member
That is a PE6 issue which we will need to look into.

If you just use one item per 'case' instead of 2 items you should be ok.
 

johnnewyork

New Member
Hi Guys, I've been away awhile. I started a new project,things were working great until I upgraded to window 7 and PE6 san simulated the serial terminal. The same source code listed above but the new issue is: When I simulate the code the Serial Terminal appears to receive bytes but the simulator does appear to received terminal responses back. Do I have a setting wrong? the simulator appears to be stuck at the SERRXD line.

Any support would be appreciated.

thanks

john


Serial Terminal Simulation:

Picaxe online

[Data transmitted -] $p2
 

Technical

Technical Support
Staff member
Your code in post 1 does not support doing anything if 'p' is the second character?
 

johnnewyork

New Member
true, but I did check other inputs


code:
sertxd ("Picaxe online", cr,lf)

top:
serrxd b0 'example: input "$l2" include "" for simulator

if b0 = "$" then
{

'parse the token:B1
select b1
case "I"
sertxd ("I: ", b2, cr,lf)

case "L"
sertxd ("L: ", b2, cr,lf)
endselect
}
else
sertxd ("invalid entry", cr,lf)
endif
goto top

code:


simulation:
Picaxe online

[Data transmitted -] $P2

[Data transmitted -] $l2
 

hippy

Ex-Staff (retired)
It is not clear what you are expecting to see but if I send "$P2" ( including the quotes, Raw mode selected in Terminal ) I see on the Terminal Window -

Picaxe online
invalid entry
invalid entry

That would seem correct. The first "$" is placed into 'b0' so it then executes the SELECT, but 'b1' will be zero at that point so no CASE options match so it returns to the 'top:' label. Next it reads "P" into 'b0' which doesn't match so prints "invalid entry", returns to 'top:', then same again for "2", then it waits at SERRXD because there is no further data for the command.

Check you have the latest PE6 installed and perhaps describe exactly how you have PE6 configured when simulating.
 

johnnewyork

New Member
thank you, I modified my original old working code for the example above it's not the best example, sorry. I have PE6.0.6.3, using the default Simulation settings.
in ASCII and raw mode I send $I2 with no response from the program.

code:

sertxd ("Picaxe online", cr,lf)

top:
serrxd b0,b1,b2 'example: input "$l2" include "" for simulator RAW

if b0 = "$" then
{

'parse the token:B1
select b1
case "I"
sertxd ("I: ", b2, cr,lf)

case "L"
sertxd ("L: ", b2, cr,lf)
endselect
}
else
sertxd ("invalid entry", cr,lf)
endif

timeout1:
sertxd ("Nothing received", cr,lf)
goto top


simulator:

[Data transmitted -] $I2

[Data transmitted -] "$I2"



I wonder if I missed a setting somewhere, the problems started when I upgraded the PC to Win 7 64 bit, when running Win XP I did not have any simulation issues.

thanks for your suggestions, I will load the latest PE code, and try using a [Timeout] to see what happens

thanks john
 

johnnewyork

New Member
installing PE 6.0.6.4 resolved my simulation issues. thanks guys


simulation:
Picaxe online

[Data transmitted -] "$P2"
Nothing received

[Data transmitted -] $i1
Nothing received

[Data transmitted -] 111
invalid entry
Nothing received
Picaxe online

[Data transmitted -] 123
invalid entry: 123
Nothing received

[Data transmitted -] $123
Nothing received

[Data transmitted -] $123
invalid entry: 3$1
Nothing received

[Data transmitted -] 11
invalid entry: 231
Nothing received

[Data transmitted -] 11
invalid entry: 111
Nothing received

[Data transmitted -] 1

[Data transmitted -] 11
invalid entry: 111
Nothing received

[Data transmitted -] $123
Nothing received

[Data transmitted -] $L1
invalid entry: 3$L
Nothing received
Picaxe online

[Data transmitted -] $L1
L: 1
Nothing received
 
Top