Serial to ASCII
|Top Previous Next|
This interface is a companion module for GetSerial and unlocks the ability to monitor additional serial/RS232 ports (physical or virtual), up to as many as you need. Messages received by this API are output to a directory as a text file that is then read in by the GetASCII API. This API requires the GetASCII API to function.
Step 1: Create a directory for the Serial to ASCII receiver
1) In Windows, create a new directory for the Serial to ASCII receiver. This can be any folder accessible to PageGate, whether on the local hard drive or by UNC path to a network resource. However, if PageGate will need to reference a network resource, the services relevant to these processes will need permission to access it. For more information, see the services section of the documentation. We recommend creating a directory called S2ASCIIX where X is the number of the interface running as a sub-directory of PageGate's database directory (By default, c:\PageGateData\S2ASCII1\).
2) Unzip the Serial to ASCII file you were sent upon purchasing the API in to the folder you created in step 1.
Step 2: Configure the Serial to ASCII receiver's settings
1) The first thing we'll need to do is modify the Serial2ASCII.ini file. Open the file in notepad.
To give you a little more information, the Serial2ASCII.ini file controls the behavior of the Serial to ASCII receiver.
2) Change RunStyle=Application to RunStyle=Service
3) Change SwitchStyle=False to SwitchStyle=True
4) Set DataFolder= to the directory you created in step 1. By default, DataFolder=C:\PageGateData\S2ASCII1\
5) Set ComPort= to the serial/RS232 port that should be monitored.
6) Set ComSettings= to the communication parameters required. Values must be passed as baud rate,parity,databits,stopbits
For example, this string would use 9600 baud, no parity, 8 data bits and 1 stop bit:
and this string would use 1200 baud, even parity, 7 data bits and 1 stop bit:
8) After configuring all appropriate input parameters, save and close the .ini file.
Step 3: Run the Serial to ASCII receiver
1) Open a command prompt with elevated permission.
2) Change directory to the Serial to ASCII receiver's program directory. By default, c:\PageGateData\S2ASCII1\
3) Type the following and hit enter:
4) Exit the command prompt.
5) Open the Services list in Windows.
6) Find and start the Serial 2 ASCII 1 service.
Step 4: Configure the GetASCII API to process the TAP to ASCII receiver's messages
Note: You must configure a basic polling directory before specifying these advanced polling settings.
1) Go to Interfaces - GetASCII - Settings - Advanced Polling - Files.
2) Click Add.
3) Specify the following:
From: Leave blank or specify a value
Path: Specify the output path of the TAP to ASCII receiver. By default, c:\PageGateData\Serial2ASCII1\
File Type: Standard
4) Click Apply, then click Apply again.