Questions? Search our site or call us at 1-800-722-6004

Sending Output Commands to Your Device

Ouput commands have many uses, including (but not limited to!) prompting your device for data.

Note: Output commands and their funtions are at the sole discretion of the device manufacturer and can be found by either looking through your device's manual (under RS232 communication or Serial Output) or by calling them directly. All commands can be tested in WinWedge by configuring your Port > Settings to your device specific parameters and then opening the Port > Analyze window. The bottom field is where you would enter your command (by either typing it in or using the supplied ASCII chart). After you send the command and if you are expecting a response, the data should appear in the top Input field. If you do not see any data, the ouput command may be incorrect or the device parameters may be wrong.

Defining Serial Output Strings

Selecting "Output Strings" from the Define menu opens the dialog box shown below where you may define an acknowledgment string, a timer controlled output string and up to 20 button controlled output strings that can be sent to your serial device while WinWedge is active.

The Acknowledgment String is a character string that is automatically sent out the serial port after each complete data record is received from your serial device. The capability to send an Acknowledgment string was originally intended for those devices that require an acknowledgment (an ACK character for example) but it could also be used as a way to continually request data from a device that can be polled by sending it a character string.

A Timer Controlled Output String may also be defined that is automatically transmitted at regular intervals. The timer interval value may range from 50 to 99,999,999 milliseconds (i.e. 1/20th of a second to once every 27 hours). A check box also allows you to specify if timed automatic outputs are initially enabled as soon as you activate WinWedge. If a timer controlled string is defined, a menu item in WinWedge window (displayed after WinWedge is activated) will allow you to enable or disable Timed Automatic Outputs.

In the bottom of the Output String Editor dialog box, you may also define up to 20 "Button Controlled Output Strings" (referenced as "String1" through "String20") that are each associated with a "button" in WinWedge window after you activate WinWedge. Clicking your mouse on an output string button in WinWedge window causes the string to be sent out the serial port to your device. When defining button controlled output strings you may also specify a "Button Caption" for each button to remind you of its contents or purpose. For example, many electronic balances can be prompted to transmit a weight reading by sending them a certain prompt string. For a Sartorius balance the prompt is an Escape character (ASCII 27) followed by a capitol P. For a Mettler balance the prompt is a capitol S followed by a carriage return (ASCII 13) and a linefeed (ASCII 10).

For this situation, you could define an output string containing the required prompt characters and also define its button caption as "Send Data". Then whenever you click your mouse on the button with the caption "Send Data" in WinWedge window, the prompt string would be sent to the scale causing it to send back a weight reading.

When defining a caption for a button you can assign an access key to the button by including an ampersand (&) in the caption immediately preceding the character you want to be used as the access key. This character will appear underlined in the button caption when WinWedge is activated. Pressing the underlined character in combination with the Alt key while WinWedge is active and has the input focus has the same effect as clicking your mouse on the button. For example, specifying "&Send Data" for a button caption would cause the button to appear as below with Alt + S being the access key.

When editing any of the output strings in the Output String Editor dialog box, an ASCII chart is available so that you can select ASCII characters or control codes that cannot be entered on your keyboard. For example to enter a specific ASCII character in an output string, move the cursor to the point in the output string where you would like the character to go and then click your mouse on the button marked "ASCII Chart". When the ASCII chart appears, scroll down the list until the character that you want is highlighted and click the OK button in the ASCII chart. The character will appear where the cursor is in the output string.


Categories: Tutorial / How-To

Last Updated: 2011.07.06

Need more help?

Don't hesitate to call or email us with your questions

Our office is open 9AM - 5PM Monday Through Friday (E.S.T.)

Technical Support: 215-496-0202

Toll-Free: 1 (800) 722-6004
Skype: taltech1 (Voice only)
Email: support@TALtech.com