Using The Amulet Serial Protocol Simulator

The Simulator program allows a user to interact with an Amulet Easy GUI module without an additional piece of hardware. The interaction is accomplished in one of two ways. The first way is by being able to view the different types of Amulet commands transmitted by an Easy GUI module and by simulating responses to the Amulet commands. The second way allows the Simulator to transmit Amulet commands instead of waiting for them and simulating responses.

For more detail on using the Simulator, click on the following topics:


Starting The Simulator

The Simulator runs on Windows 95, 98, ME or later. The Simulator may be invoked by any standard Windows method:


Setting Up The RS-232 Port

The Simulator uses an RS-232 port on your PC to communicate with the Easy GUI module. Prior to communicating with the Easy GUI module, you must select a comm port, baud rate, Simulator mode, and specify whether the Simulator is to use the old or new opcodes. The Simulator can be set up to run in either slave mode or master mode. In slave mode, the Simulator responds to valid Amulet request commands. In master mode, the Simulator sends out Amulet commands instead of responding to them. The factory default settings are "COM1" for Comm Port, "115200" for the Bit Rate, "Slave" for the Simulator Mode, and "New Opcodes" for the UART. In order for the Simulator to be able to communicate with your Easy GUI module, be sure to verify that the baud rate on the Simulator matches the baud rate of the currently programmed uHTML project. The baud rate can be found by viewing the META tag in the <HEAD> section of the default home page of the uHTML project. Example:

<META NAME="Amulet" Content="baud=19200">

To select a serial port for communications:

  1. From the Simulators RS232 menu, select Settings. You will be presented with a RS-232 dialog box similar to the one pictured below.
  2. Next, select any available serial port from the Comm Port list.
  3. Choose a baud from the Bit Rate list. The bit rate must match the bit rate selected by the home page of the uHTML project.
  4. Choose a Simulator mode from the Mode list.
  5. Then, choose the opcodes version from the UART list. For more information on the opcodes version, click here.
  6. Finally, click the OK button.

If you haven't already done so, be sure to have the Easy GUI module connected to your PC's serial port via a standard serial cable.


Running The Simulator

By default, the Simulator will not be in simulation mode. To enable simulation, first setup the RS-232 port as mentioned in Setting Up The RS-232 Port.
Then, click on the "Open Port" button beneath the menu bar. Once the "Open Port" is pressed, the Simulator is now ready for serial interaction with an Easy GUI module. All RS-232 communications between an Easy GUI module and the Simulator are shown in the text area of the program window as long as the Stop Monitoring checkbox is left unchecked. The Simulator will respond to all Amulet commands transmitted by the Easy GUI module by echoing back the appropriate data as specified in the Protocol.htm document.

NOTES:


Amulet Get Byte Variable

You may, at anytime while running the Simulator in slave mode, respond to an Easy GUI modules get byte variable command as long as the variable being requested is in one of the drop-down lists in the Amulet Get Command frame. The Amulet Get Command frame allows you to use a text field for entering a byte worth of data to transmit. To respond to a supported byte variable:

  1. First, select the byte variable from one of the drop-down lists in the Amulet Get Command frame.
  2. Next, enter the byte value in the text field next to the corresponding drop-down list.

The following example shows the Simulator responding to a get byte variable command using the new opcodes.


If the byte variable being requested by the Easy GUI module is not selected in either drop-down list in the Amulet Get Command frame, then the Simulator will transmit an acknowledgement command back to the module.

NOTES:


Amulet Get Word Variable

The get word variable command is very similar to the get byte variable command except that you can ONLY USE the lower drop-down list in the Amulet Get Command frame to select a word variable. To respond to a supported word variable:

  1. First, select the word variable from the lower drop-down list in the Amulet Get Command frame.
  2. Next, enter the word value in the text field next to the drop-down list.

The following example shows the Simulator responding to a get word variable command using the new opcodes.


If the word variable being requested by the Easy GUI module is not selected in the lower drop-down list in the Amulet Get Command frame, then the Simulator will transmit an acknowledgment command back to the module.

NOTES:


Amulet Get String Variable

The get string variable command is also very similar to the get byte variable command, but instead of returning a single byte of data, a null-terminated ASCII string is returned. To respond to a supported string variable:

  1. First, select the string variable from the drop-down list in the Amulet String Command frame.
  2. Next, enter the string in the text field next to the drop-down list.

Each time the Easy GUI module requests a string variable that you have selected in the Amulet String Command frame, the Simulator will transmit the string you have entered in the text field along with a null character to signify the end of the string.

User-defined wraps can be specified by entering "\n" within the text field at the spot you would like the wrap to occur. As an example, entering "This Line\nNext Line" in the text field will result in a 0x0A being sent out between This Line and Next Line. The Amulet StringField Widget interprets the 0x0A as a line feed, so if the StringField Widget is tall enough to handle two lines of text, you would see on the Amulet:

This Line
Next Line

 The following example shows the Simulator responding to a get string variable command using the new opcodes.


If the string variable being requested by the Easy GUI module is not selected in the Amulet String Command frame, then the Simulator will transmit an acknowledgment command back to the module.

NOTES:


Amulet Get Label Variable

The get label variable command is almost exactly like the get string variable command. The only differences are the first bytes in the request and response messages. Assuming the Simulator is using the new opcodes, the first byte of the get labels request message is a [0xD3] as opposed to the get strings [0xD2]. The first byte of the get labels response message is a [0xE3] as opposed to the get strings [0xE2]. The label text is taken from the same text field as the get string variable command. The Simulator automatically determines whether to respond to a get string variable or a get label variable command.


Amulet Invoke Remote Procedure Call (RPC)

The Amulet Invoke Command frame notifies the Simulator when the Easy GUI module has issued an invoke RPC command. While the Amulet Get Command frame is more of a read/write frame depending on whether you have the Simulator running in slave or master mode, the Amulet Invoke Command frame is read only. Whenever an invoke RPC command is received, the Simulator displays the value of the function in the Amulet Invoke Command frame. Also, the text color of the requested function toggles each time an invoke RPC command is received.

The following example shows the Simulator responding to an invoke RPC command using the new opcodes.


The Simulator will automatically transmit an acknowledgment back to the module when an invoke RPC command is received.


Amulet Set Byte Variable

The Simulator can receive or transmit a set byte variable command depending on which mode the Simulator is running in. In slave mode, the Amulet Set Command frame operates much like the Amulet Invoke Command frame except that it notifies the Simulator when it has received a set byte variable command. For example, receiving "[0xD5][0x36][0x35][0x46][0x46]" can be interpreted as set byte variable 0x65 to a value of 0xFF. Just like the invoke RPC command, the text color toggles each time a set byte variable command is received. The Simulator will automatically transmit an acknowledgment back to the module when a set byte variable command is received.

The following example shows the Simulator responding to a set byte variable command using the new opcodes.


In master mode, you can transmit a set byte variable command and specify the byte variable to set and the byte value associated with it. To set a byte variable:

  1. First, select the byte variable from the first drop-down list in the Amulet Get Command frame.
  2. Next, enter the byte value you wish to set the byte variable to in the text field next to the drop-down list.
  3. Now click on the corresponding "<< Transmit" button to the right to send the set byte variable command.

The following example shows the Simulator sending a set byte variable command using the new opcodes.


By clicking the corresponding "<< Transmit" button, a set byte variable command is transmitted serially. The Amulet module acknowledges the set byte variable command by responding with the appropriate server response.

NOTES:


Amulet Set Word Variable

In master mode, the set word variable command is very similar to the set byte variable command except that you can ONLY USE the lower drop-down list in the Amulet Get Command frame to select the word variable. To set a word variable:

  1. First, select the word variable from the lower drop-down list in the Amulet Get Command frame.
  2. Next, enter the word value in the text field next to the drop-down list.
  3. Now click on the corresponding "<< Transmit" button to the right to send the set word variable command.

The following example shows the Simulator sending a set word variable command using the new opcodes.


By clicking the corresponding "<< Transmit" button, a set word variable command is transmitted serially. The Amulet module acknowledges the set word variable command by responding with the appropriate server response.

NOTES:


Amulet Set String Variable

In master mode, the set string variable command allows you to specify a string variable to set and the string value associated with it. To set a string variable:

  1. First, select the string variable from the drop-down list in the Amulet String Command frame.
  2. Next, enter the string value in the text field next to the drop-down list.
  3. Now click on the corresponding "<< Transmit" button to the right to send the set string variable command.

The following example shows the Simulator sending a set string variable command using the new opcodes.


By clicking the corresponding "<< Transmit" button, a set string variable command is transmitted serially. The Amulet module acknowledges the set string variable command by responding with the appropriate server response.

NOTES:


File Menu

Open... Open text (*.txt) file for reviewing. Brings up a file dialog for choosing file.
Save... Save a communication session in text (*.txt) format. Brings up a file dialog for choosing the name and location to save the *.txt file.
Exit Exit the program.


RS232 Menu

Settings Brings up RS-232 settings dialog. Used to configure the COM port for communicating with an Easy GUI module and the Simulator mode.


Help Menu

Help... Brings up this help document.
About Brings up a dialog containing information about the Amulet Serial Protocol Simulator and about your computer.


Amulet Simulator
Copyright © 2000-2004 by
Amulet Technologies, LLC

Back to Welcome - Contact Amulet - Amulet Home