76
µTasker general / Re: Port simulation
« on: June 20, 2010, 09:42:15 PM »
Great, The port simulation works well to set-up my hardware in a particular configuration.
Its a shame about the the Serial port problem, my application is a Modbus client and this causes the simulation file selection dialogue to fail as you described.
I did some investigation and found a couple of things that might help in finding what the problem is.
If run my simulation and talk to it via my Modbus master (i.e. use the serial port) then when I try to open a simulation file it locks up.
But if I run up my simulation, ensuring my Modbus master is not transmitting. Then I go to PortSim to select a file, but just hit the cancel button. Then I start my Modbus master. Now I can correctly select Port simulation files. So if you execute the file selection dialogue once before any serial comms occurs. It seems to work.
Also a couple of comments I add, for the benefits of others relating to simulating port bits, (Note I'm using the PORT designations for the LM3Sxxxx chips)
// You can put comment lines at the start of a line
+100 PORT-B-3 0 // this line sets port B bit 3 to 0
+0 PORT-A 0c // set all bits of port A to 0x0c This line will execute directly after the line above because the time is +0
+0 PORT-B-1 1 // this line sets port B bit 1 to 1, with no delay from the line above again because of the +0 time delay
The default sim file to be run is stored in userfiles.ini which can be edited to allow other simulation files to be run. Note this file is only read on start-up of the simulator.
Just a thought, it might be worth adding an "autostart.sim" file that if it exists would run whenever a simulation was started to allow it to get into a default state.
Cheers
Martin
Its a shame about the the Serial port problem, my application is a Modbus client and this causes the simulation file selection dialogue to fail as you described.
I did some investigation and found a couple of things that might help in finding what the problem is.
If run my simulation and talk to it via my Modbus master (i.e. use the serial port) then when I try to open a simulation file it locks up.
But if I run up my simulation, ensuring my Modbus master is not transmitting. Then I go to PortSim to select a file, but just hit the cancel button. Then I start my Modbus master. Now I can correctly select Port simulation files. So if you execute the file selection dialogue once before any serial comms occurs. It seems to work.
Also a couple of comments I add, for the benefits of others relating to simulating port bits, (Note I'm using the PORT designations for the LM3Sxxxx chips)
// You can put comment lines at the start of a line
+100 PORT-B-3 0 // this line sets port B bit 3 to 0
+0 PORT-A 0c // set all bits of port A to 0x0c This line will execute directly after the line above because the time is +0
+0 PORT-B-1 1 // this line sets port B bit 1 to 1, with no delay from the line above again because of the +0 time delay
The default sim file to be run is stored in userfiles.ini which can be edited to allow other simulation files to be run. Note this file is only read on start-up of the simulator.
Just a thought, it might be worth adding an "autostart.sim" file that if it exists would run whenever a simulation was started to allow it to get into a default state.
Cheers
Martin