EasyManua.ls Logo

YASKAWA MP3000 Series - Page 356

YASKAWA MP3000 Series
435 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2.12 Communications with a Windows PC (Visual Basic Application)
Using Automatic Reception with the MP3000 as a Slave
2-338
'---- Check the serial number ----
If (sbuf(1) <> rbuf(1)) Then
rc = -3
Return (rc)
End If
'---- Check the total data length of the message ----
Select Case sbuf(15)
Case &H9
rcvDATAi = Val(Str(sbuf(21)) & Str(sbuf(20))) 2 + 20
If ((rbuf(6) <> rcvDATAi) And (rbuf(7) <> (rcvDATAi \256))) Then
rc = -4
Return (rc)
End If
Case Else
rc = -10
Return (rc)
End Select
'---- Check the MFC ----
If (rbuf(14) <> &H20) Then
rc = -6
Return (rc)
End If
'---- Check the SFC ----
If (rbuf(15) <> sbuf(15)) Then
rc = -7
Return (rc)
End If
'---- Check the number of registers ----
Select Case sbuf(15)
Case &H9S
If ((rbuf(18) <> sbuf(20)) Or (rbuf(19) <> sbuf(21))) Then
rc = -8
Return (rc)
End If
Case Else
rc = -10
Return (rc)
End Select
'---- Reads the register data from rbuf(21) and on ----
Return (rc)
End Function
End Module

Table of Contents

Other manuals for YASKAWA MP3000 Series

Related product manuals