beautypg.com

A - messages, Serial debug messages, Appendix a – Rockwell Automation 2711P Software Development Kit User Manual User Manual

Page 97: Messages, Appendix

background image

97

Publication 2711P-UM005A-EN-P - March 2007

Appendix

A

Messages

Serial Debug Messages

The boot loaders and WinCE support a Debug Monitor that, when
enabled, will emit trace messages on the serial port.

The Debug Monitor uses the following COM port parameters:

• 57,600Bits per Second
• 8 Data Bits
• No Parity
• 1 Stop Bit
• Hardware Flow Control

Any display device with a serial interface set to the above parameters
can be used to view the messages. The recommended cable is an
Allen-Bradley 2706-NC13 or equivalent. On a Windows desktop
computer, a communications utility such as HyperTerminal is a good
choice. The start-up operations emit a large volume of messages and
are a good opportunity to experience the debug monitor.

Serial Debug Messages can be enabled or disabled using the
Miscellaneous System API call rm_SetParameter(). For example:

// Turn on Serial Debug

rm_SetParameter(RM_PARAMETER_ENABLE_SERIAL_DEBUG,

&dwSize,

pvData);

// Make it persistent on Boot

rm_SetParameter(RM_PARAMETER_ENABLE_SERIAL_DEBUG_O
N_BOOT,

&dwSize,

pvData);

Alternatively, the ability to control the Serial Debug Option is
packaged in a standalone program named DebugOptions.exe that is
distributed in the Utilities folder on the PanelView Plus CE Accessories
CD, P/N 77159-951-55.

Within an application, debug output is easily implemented by
including the dbgapi.h header file and using NKDbgPrintfW(LPWSTR
lpszFmt, …).