AMIS-49587
http://onsemi.com
2
Setting up the software
The kit is delivered with a CDROM. Insert the CDROM in the
CD drive. For MS Windows based platforms, an installer
application is available: ONSemiPLCInstall.exe. The installer
application checks if the required Java Runtime Engine is installed.
If it is not, the installer will start downloading it from the Sun
website and install it.
For non MS Windows based platforms see SW requirements.
When the required Java Runtime Engine is installed, installation
of the ON Semiconductor PLC Modem application will proceed.
1.4.7
|
AMIS49587 GUI application note.pdf
|
plcui.chm
|
PlcUi.jar
| rxtxSerial.dll
|
Slave 7.1.plc.xml
|
Master 7.1.plc.xml
|
Spy 7.1.plc.xml
|
\---lib
AbsoluteLayout.jar
appframework-1.0.3.jar
RXTXcomm.jar
swing-worker-1.1.jar
PlcUi.jar is the main application, ‘AMIS49587 GUI application
note.pdf’ is this manual and ‘Master 7.1.plc.xml’ and ‘Slave
7.1.plc.xml’ are MODEM configuration files. Plcui.chm is the
source code documentation.
All other files are supporting libraries.
Running the Graphical user interface
The graphical user interface consists of 3 types of windows. The
main window allows the user to open a configuration file for a PLC
MODEM and implements a log of messages that traces user
activities and MODEM events. This event log can be cleared or
saved into a text file from the file menu. When a correct MODEM
configuration file is opened, a new window will appear,
implementing a user interface tailored to the type of configuration
that is opened (master, slave, monitor or spy). Master and slave
windows look very similar. Only the area where the MODEM’s
status is displayed is different. The application limits the number
of master or slave windows to 6.
The logging level can be set from 0 to 3 to choose the level of
detail of the log messages. Level 3 gives most details. The status
fields of the master and slave windows will update when the button
‘Update Status’, Reset’ or ‘Write Config’ are clicked or,
automatically, when the status pane is activated.
Figure 1 Main Window
Figure 2 Master Window
The MODEM’s can be forced to disconnect (lose
synchronization) by clicking the ‘De-sync’ button. The ‘Reset’
button shall be clicked when the modem is in an unknown state or
the user would like to start from a not configured MODEM.
When parameters, listed in the configuration file and exposed in
the GUI are changed, these changes can be saved into a new
configuration file by picking ‘Save Configuration’ from the master
or slave window file menu, or by pressing ‘CTRL-S’ (for now,
only the communication port and the MAC layer filter setting can
be changed from the GUI).
Note that all MODEM’s settings can be modified by editing the
configuration file in a text editor. The configuration file is an
XML file. Each MODEM parameter is encapsulated in parameter
name and value keywords. All parameters are to be coded in
hexadecimal numbers. Below is an example that shows how the
local MAC address is set to 0x555:
<LocalMac>
<Bits>16</Bits>
<Value>555</Value>
<Note>Number within FIMA to LIMA range</Note>
</LocalMac>
Only the value between <Value> and </Value> should be changed.
New settings can be activated by loading the new configuration file
from the main window.
The current PLC GUI implements a simple chat, data loop or file
transfer application between a master and a client. Before being
able to exchange data, one master configuration and at least one
slave configuration needs to be opened from the main window on
one or more PC’s.
To start communication, the following steps need to be executed
for both the master and the slave(s) windows:
Common to all 3 communication examples are:
1)
Pick the serial port that is connecting the PLC master
MODEM. Only the serial communication ports available in
the PC are listed. Success or failure to open the chosen
communication port can be monitored in the log that is
displayed in the main window.
2)
Click the ‘Reset’ button to bring the MODEM into a
known, not configured state.
3)
Click the ‘Write Config.’ button to send the configuration
parameters to the MODEM. Check the main window log to
find out if this step completed without errors.