FunWithRules

From ATCSMon Wiki
Jump to navigation Jump to search

Using Rules

The Rules feature of ATCSMon can be made to do a number of useful things while it is "watching" routes as trains chug along. For example, suppose you'd rather not have to check the screen all the time to know when a train arrives at a certain point in your area. That's what Rules are for. You can create a Rule to play God Bless America when the train hits a certain point on your line.

What Rules can Do

The basic idea is that a rule can make something happen on your computer when a particular event comes up on ATCS. For example, suppose you have a favorite place to get pictures of trains and you know a particular train is coming your way. You'd like your computer to play Chattanooga Choo Choo when the train is approaching. You figure out what ATCS message indicates a train's approach to your favorite way point. Then you create a rule to play the .wav file when the train is coming.

There are seven different actions that you can ask ATCS to do when a particular message arrives:

  • Display a pop-up message
  • Log the message in the Messages window
  • Log the message to a file
  • Log the message to the default printer
  • Play a sound ( .wav file)
  • Beep through the computer speaker
  • Do nothing

If you are clever with electrical stuff, you can use the printer port to do something "electrical."

Example of a Rule

This example is provided by Bill Foster, President of the Haley Tower Historical & Technical Society, at the request of a member. Bill wanted a bell to ring when a northbound train was lined through Belt Jct. His goal was to make ATCS sound much like Haley Tower did when it was in operation. Here's what he did:

  1. Before you start, be sure the .wav file is in the ATCS directory/folder
  2. In the ATCS Monitor window, select Configure -> Rules...
  3. In the Configure Rules window should be one rule, DataGrams, which should be checked--leave it alone
  4. Click New Rule
  5. Name of rule: =Northbound bell=, which is what Bill wants to do
  6. Address matches: =71255560260202=, which is the address of Belt Jct.
  7. Mnemonic matches: =1NAK&1NGK=, which are the indicates for the movement Bill wants to catch
  8. Leave the Packet type and Message type blocks empty
  9. In Perform these actions: click the Play sound box (you could do more than one action)
  10. Click Filename, navigate to the .wav file, and open it
  11. Click Play to check the file
  12. Close and you have a new rule

Not that hard, right? But there are a few stumbling places:

  • Be sure the .wav file is in the ATCS directory/folder or ATCS won't find it to play next time
  • The mnemonics you are using as your trigger must be exactly right
  • When you exit from ATCSMon, be sure to save the current settings

Thanks, Bill Foster!

-- Main.BillTheOther - 2012-04-01