B&B Electronics MODSCAN32 - Manual User Manual
Page 49

49
If Index = 259 Then statusline = "Invalid Device Address" 
If Index = 260 Then statusline = "Invalid Length Specification" 
If Index = 261 Then statusline = "Invalid modbus command" 
If Index = 262 Then statusline = "Driver Out-Of-Memory" 
If Index = 263 Then statusline = "** Time-Out **" 
If Index = 264 Then statusline = "Invalid Protocol Specification" 
If Index = 265 Then statusline = "** Bad Checksum **" 
If Index = 266 Then statusline = "Server NOT Connected" 
If Index = 267 Then statusline = "Invalid Response from Driver" 
If Index = 268 Then statusline = "Modbus Write Failure" 
If Index = 269 Then statusline = "Remote Server not Connected" 
If Index = 270 Then statusline = "** UNINITIALIZED **" 
If Index = 271 Then statusline = "ModScan Demo Time Expired" 
 
 
End Sub 
 
Private Sub holdingregsaddress_Change() 
‘ 
‘ User has changed address for holding registeres 
‘ 
If (IsNumeric(holdingregsaddress.Text)) Then 
 StartAddress(3) = holdingregsaddress.Text 
 Modbus_Addr = Modbus_Id(3) + StartAddress(3) 
 status(3) = m_svr.ModifyPollRequest(PollHandle(3), SlaveDevice, Modbus_Addr, 10) 
 StatusMsg (status(3)) 
End If 
 
End Sub 
 
Private Sub inputaddress_Change() 
‘ 
‘ User has changed starting address for 
‘ input status points 
‘ 
If (IsNumeric(inputaddress.Text)) Then 
 StartAddress(0) = inputaddress.Text 
 Modbus_Addr = Modbus_Id(0) + StartAddress(0) 
 status(0) = m_svr.ModifyPollRequest(PollHandle(0), SlaveDevice, Modbus_Addr, 10) 
 StatusMsg (status(0)) 
End If 
 
End Sub 
 
Private Sub inregsaddress_Change() 
‘ 
‘ User has changed input register address 
‘ 
If (IsNumeric(inregsaddress.Text)) Then 
 StartAddress(2) = inregsaddress.Text 
 Modbus_Addr = Modbus_Id(2) + StartAddress(2) 
 status(2) = m_svr.ModifyPollRequest(PollHandle(2), SlaveDevice, Modbus_Addr, 10) 
 StatusMsg (status(2)) 
End If 
 
End Sub 
 
Private Sub Timer1_Timer() 
