Fuji Electric PXG-9 Communication Instruction Manual page 71

Digtal controller micro controller x communication function (rs-485 modbus)
Hide thumbs Also See for PXG-9:
Table of Contents

Advertisement

' Communication Port Settings ****************************************************************
If Com5.Value = True Then
Comm_port = 5
ElseIf Com4.Value = True Then
Comm_port = 4
ElseIf Com3.Value = True Then
Comm_port = 3
ElseIf Com2.Value = True Then
Comm_port = 2
Else
Comm_port = 1
End If
If SPD192.Value = True Then
Comm_speed = "19200,"
ElseIf SPD96.Value = True Then
Comm_speed = "9600,"
Else
Comm_speed = "38400,"
End If
If Even1.Value = True Then
Comm_parity = "E,"
ElseIf Odd1.Value = True Then
Comm_parity = "O,"
Else
Comm_parity = "N,"
End If
PauseTime = 0.2
idx = 0
' Opening the Communication Port *************************************************************
MSComm1.CommPort = Comm_port
MSComm1.Settings = Comm_speed & Comm_parity & "8,1"' Speed / Party / 8bit_Data / Stop_1bit
MSComm1.PortOpen = True
' Setting the Communication Number for the Other Party ***************************************
St = Val(Stno1(idx).Text)
Stno = St Mod 256
Stno1(idx).Text = Str(Stno)
' Processing the Address *********************************************************************
AD$ = Str(Val(Address(idx).Text) - 1)
AD$ = Right$(("00000" & AD$), 5)
Area = Val(Left$(AD$, 1))
Adrsh = Int(Val(Right$(AD$, 4)) / 256)
Adrsl = Val(Right$(AD$, 4)) Mod 256
' COM5
' COM4
' COM3
' COM2
' COM1
' 19200bps
' 9600bps
' 38400bps
' Even parity
' Odd parity
' Parity none
' Sets the wait time. (0.2 sec)
' COM port settings
' Port open
– 69 –
Chapter
8

Hide quick links:

Advertisement

Chapters

Table of Contents
loading

This manual is also suitable for:

Pxg-5Pxg-4

Table of Contents