Using RealLink

In order to debug the menu application example from your PC, you should use the RealLink feature that is part of the visualSTATE Validator. First however, you must code generate for RealLink, and then build and download a the image in order to be able to use the RealLink feature. The build is explained in Build with RealLink and we assume here that you have done that or are continuing reading from First Test.

Ensure that you have a null-modem cable connected between the RS232 COM Port of the Target board and a COM port of your choice on your PC (see Hardware & Software). Now start the visualSTATE Validator from the visualSTATE Navigator by selecting Project->Validator (F8).

By default, RealLink uses the COM1 port at 9600 Baud to communicate with the board. Our demo will use a speed of 19200 Baud (N81), so we need the settings by selecting RealLink>Properties. Select the RS232Plugin.dll plugin and press Configure. Now set the approprate COM port and BaudRate and then close the dialogs.

Now select Window->Classic Simulation to obtain three windows for Event, System (States) and Action, arranged next to one another. Connect to the board by selecting RealLink>Connect. This will halt the event deduction on the Target (it will no longer respond to joystick actions). The output pane in the lower section of Validator should show that the RealLink connection is successfully established. Now right-click all three of the Event, System and Target windows to get a context menu where you can specify that these windows are to represent the current situation on the Target (rather than the situation of the local model on the PC). Afterwards, the caption text of these windows should have [Target] appended (rather than [Validator] which stands for the local model) .

Instead of generating events by using the joystick on the board, use the Event window in the visualSTATE Validator to generate events. For example, try double-click event SE_RESET then eKey_Up, then eKeyRight. You should wind up with the following screen:

You can use RealLink->Run (F8) to 'hand back' control over the application events to the Target. Try this out. The board will now respond again to joystick manipulations. After a while to may select RealLink->Break (Shift+F6) and Validator will update it's screen to reflect the current states of the StateChart. You may also whish to experiment with the Graphical Animation feature of visualSTATE. Refer to the visualSTATE documentation for more information.

When you are done debugging via RealLink, disconnect from the board by selecting RealLink>Disconnect and then close Validator.

Note: You shoud always disconnect before closing the Validator in RealLink mode to prevent the risk of a hang-up. In case you do experience a hang-up with ReallLink and cannot close the Validator, then press Ctrl+Alt+Del to bring up the Windows Task Manager. On the Processes Tab, identify the process TS.exe and use the End Process button to terminate it as the propable cause of the freeze.