Yokogawa JUXTA VJ Series Limit Alarms User Manual

Page 30

Advertising
background image

3-16

<Toc> <Ind>

<3. PC Link Communication >

IM 77J01J11-01E

3.3.1

Example of Communication Program Created Using Visual

Basic

This subsection shows a sample program created using Microsoft Visual Basic 6.0.

Operation verification environment: PC/AT compatible machine + Windows NT 4.0
(SP4), Windows 95

PC/AT is a product of International Business Machine Corp.
Visual Basic is a registered trademark of Microsoft Corporation.

See Also

MSDN and commercially available documentation for information on Visual Basic programming.

The sample program reads the contents of D register D0002 using the PC link communica-
tion protocol. When you press the Command button, the commands sent and responses
received will be displayed in a form. If no response is received, a timeout will occur.

030301E.EPS

'==========================================================

' Program name: Sample

'

' RS-485 communication program for VJ series

'

'============================= YOKOGAWA Electric Corporation ===

'

'Definition of public variables

Public fSend As Boolean

'Sending flag

Public strSend As String

'Character string sent

Public strBuf1 As String

'Character (1 byte) received

Public strReceive As String

'Character string received

'When the Command button is pressed,

Private Sub Command1_Click()

strSend = "01010WRDD0002,01"

'Character string to be sent

'[stx]01010WRDD0003,01[etx][cr]

3rd Edition : Oct. 15, 2007-00

Advertising
This manual is related to the following products: