Skip to main content

Reply to "A Scripting Language you can use to control your MTH Engines"

As I posted on this thread:

https://ogrforum.ogaugerr.com/...onnection-to-the-tiu

I've been able to figure out how to access the RAM memory in the engine and what some of those memory locations mean.

Some words on my web page and a link to the current version of a document that I'm writing.

http://www.silogic.com/trains/RTC_Running.html#RAM

I've added several "Get" functions to my scripting language. Now, from the lua script, you can command the engine to go to a particular speed and then check that it has reached that speed.

I added:

 GetDirection(Engine, TIU);    -- return the direction as an boolean,
-- true =
FORWARD, false = REVERSE

GetVolume(Chan, EngineNo, TIUNo);
-- returns the volume level (0-100) of the channel given by Chan.


GetSpeed(Engine, TIU); -- return the set speed as an integer,
-- engine may be accelerating or decelerating to reach this speed


GetInstSpeed(Engine, TIU); -- return the instantaneous speed of the engine

RAM(address, Engine, TIU); -- returns the byte at the RAM address given as address.

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
×