Simulator - SerIn issue

MPep

Senior Member
Hi people,

Has anybody else noticed that when you write a program that requires SerIn with a qualifier, you must remove the qualifier for the simulator to work correctly?
Code:
serin 1,N2400,("RMC,),b0,b1
Using this structure causes no response in the simulator when I enter ' "RMC,12",13,10'

If I remove the RMC part, and enter just the values that I want to use in the rest of my program, all is well.

This was tested using a 08M.

Any thoughts?

Cheers,
MPep.
 

westaust55

Moderator
Hi people,

Has anybody else noticed that when you write a program that requires SerIn with a qualifier, you must remove the qualifier for the simulator to work correctly?
Code:
serin 1,N2400,("RMC,),b0,b1
Using this structure causes no response in the simulator when I enter ' "RMC,12",13,10'

If I remove the RMC part, and enter just the values that I want to use in the rest of my program, all is well.

This was tested using a 08M.

Any thoughts?

Cheers,
MPep.
Dont know whether you have cut and past, but should not:
serin 1,N2400,("RMC,),b0,b1

read

serin 1,N2400,("RMC,12"),b0,b1

to work with the data sent as: "RMC,12",13,10'
 

hippy

Technical Support
Staff member
This seems to be an issue with the SERIN pop-up of the simulator; it will not allow a match with commas when used in the qualifiers. We will investigate the issue.

As a workround for ...

SerIn 1, N2400, ( "RMC,XY" ), b0, b1

Replace that with ...

SerIn 1, N2400, ( "RMC", 46, "XY" ), b0, b1

Which will run as expected on a real PICAXE ( 46 = "," ), and in the simulator enter ...

"RMC",46,"XY",1,2
 

MPep

Senior Member
@WA,
No. The SerIn should not read like that, because the field straight after "RMC," is the time field. As this changes all the time, I do not want to wait until 12:xx:xx UTC!
I did not cut-'n-paste.

I actually entered that string incorrectly in creating this post.
It should have read 'serin 1,N2400,("RMC,"),b0,b1'.
Sorry for confusion. My code was indeed correct.

Entering ' "RMC,12",13,10 ' exactly as that is the format that the simulator expects. In this case I am entering 12 hours UTC.

@Hippy,
Thanks for that work-around. Will try that today.
Interesting that the simulator does not 'read' commas. Am surprised that no-one else has noticed this before, or at least bothered to mention it to you.

Cheers folks.
 
Top