PetroCount IMS data communication interface

R

Thread Starter

Ricardo Zuniga

Anyone can help me on PetroCount IMS data communication interface ?
I am looking for PETROCOUNT IMS SYSTEM MANUAL Publication X050S.
 
Hi,

With petrocount u can communicate by
ascii or binary.

The Start bit is used to allow the receiving device to synchronize the bit timing at the beginning of each frame. It is always a space.
The Data Bits can be in either binary or ASCII formats. Binary format is normally 8 bits and represents any code from 0 to 255. ASCII is a 7 bit encoding system, which provides special control characters as well as most characters found on typewriter.
Parity is a method used to detect data errors. If odd parity is used, the parity bit is set such that the number of data bits and the parity bits, which are ones, are an odd number. If even parity is used, the parity bit is set such that the number of data bits and the parity bits, which are ones, are an even number. Parity bit is optional. If not used, each frame is one bit shorter.
The Stop bit is used to guarantee the one to zero transition that occurs at the start bit. The stop bit is always a Mark.

Protocol used in IMS-PC is called Brook’s protocol.
Brook’s protocol requires that each master station and each slave station be assigned a unique station address. In order to send information to slave station, the master station must send a message in the format defined in the Message Structure. All slave stations receive the message. The slave station responds in one of the following ways:
Return data if required,
Return an acknowledge,
Return a negative acknowledge,
No response

For our application we will be using Computer Mode as this mode has added error detection capabilities.

The Message structure used in MODBUS protocol has three sections: -
Heading
Text
Block Check Characters

Heading is made of Start of Header (SOH) character, the source address and the destination address. The SOH is an ASCII character with a value of 01, which tells the receiving station that the characters to follow are the destination and source address. The source address is the station address of the station transmitting the message. It must be three ASCII characters long and in the range of 001 to 999. The destination address is the address of the station to which the message is being sent. The destination address must be three ASCII characters long and in the range of 001 to 999.

The text section of the message consists of Start of Text (STX) character, the information to be passed to the destination station, and the End of Text (ETX) characters. The STX is an ASCII character with a value of 02, which tells the destination station that the characters to follow are the text of the message. The text is the message must be in ASCII type. The ETX is an ASCII character with a value of 03 that tell the destination station that the end of text portion of the message has been reached.

The Block Check Characters (BCC) always follows the ETX characters. The destination station to verify the accuracy of the data received uses these characters.

The text portion of the message may contain the following message types: -
Read Character data.
Write character data with return data
Write character data with return acknowledge
Write character data with no response
Write Character data upon confirmation
Confirm write character data
Execute a task.

For our application we will be using Read Character data type since we have to just read data from IMS-PC.

The Read Character message type is used to inspect or interrogate a particular parameter value within the receiving station. This message type is identified by the ASCII code for the symbol R (52 hex).

The general format to perform a read is as follow: -
R820 - To read the Preset Quantity
R821 - To read Remaining Quantity
R822 - To read Current Delivered Quantity (Net)
R823 - To read Current Delivered Quantity (Gross).

To see other format please refer table Format in PetroCount.mdb

More than one parameter may be read or written with write and read character data message type within one message. Semicolons must separate the parameter number and the message type symbol must not be repeated. Only one message type is allowed per message.

R820;821 – To read the Preset Quantity and Remaining Quantity.

If one wants to read parameter R820 (Preset Quantity) with a master address 001 to a destination address 045, the following syntax is used.

Request: SOH045001STXR820ETXBCC

Reply : SOH001045STX820=00000009999ETXBCC
 
Top