ABB PGC2000 Operation And Service Manual page 386

Process gas chromatograph
Table of Contents

Advertisement

msg_type% is the message type; for Vista BASIC this is always 0.
block_type% is the block type; for Vista BASIC this is always 0.
flags% is the message flag; for Vista BASIC this is always 0.
Example:
shown below
SEND MESSAGE Command
Description:
Sends a UDP message from one VistaNET device to another.
Syntax:
SND_MSG(header$,data$)
Comments:
header$ is the UDP message header constructed using the BUILD
HEADER Command.
data$ is the ASCII data block to be sent.
Example:
shown below
SEND REPLY Command
Description:
Sends a VistaNET reply to another VistaNET device.
Syntax:
SND_RPL(header$,data$)
Comments:
header$ is the UDP message header received using the RECEIVE
HEADER Command.
data$ is the ASCII data block to be sent.
Example:
shown below
RECEIVE HEADER Command
Description:
Receives a UDP message header from a VistaNET device.
Syntax:
HDR$ = RCV_HDR$
Comments:
HDR$ is a string variable which will store the received UDP header
information. If the length of HDR$ is 0 upon executing this command, no
message has been received.
Example:
shown below
RECEIVE DATA Command
Description:
Receives a message from a VistaNET device.
Syntax:
DATA$ = RCV_DATA$
Comments:
DATA$ is a string variable which will store the received data.
Example:
shown below
VistaNET Messaging Example
The sending application is located at VistaNET address 0.1.0.5. The receiving application is located
at VistaNET address 0.1.0.4
At 0.1.0.5 (the sending end):
First the message header is built:
Then the message is constructed:
The message is sent:
At 0.1.0.4 (the receiving end):
A BASIC program (usually in real-time BASIC table number 8) is written to accept VistaNET
messages:
10-36
0010 HDR$ = BLD_HDR(1,4,518,1,0,0,0)
0020 DATA$ = "THIS IS THE MESSAGE"
0030 SND_MSG(HDR$,DATA$)
0010 HDR$ = RCV_HDR$
0020 IF LEN(HDR$) = 0 THEN END
0030 DATA$ = RCV_DATA$
2000-OSM, F1

Advertisement

Table of Contents
loading

Table of Contents