Simplicity Synergy X9 Specifications Page 182

  • Download
  • Add to my manuals
  • Print
  • Page
    / 352
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 181
Synergy Nano Technical Manual, Revision -
Page 182
Visual Basic Code: Sending
Sending with Serial Ports
‘ If your not connected, tell the user
If (Not MSComm1(Index).PortOpen) Then
MsgBox ("The RS 485 port is not connected. Please connect and try again.")
End If
' Clear buffer
a$ = MSComm1(Index).Input
txtIn(Index).Text = ""
‘ Send the command in the command text box
MSComm1(Index).Output = txtOut(Index).Text & vbCr
' The 485 send requires a ">" and the address such as "02" in the string. Use:
‘ MSComm1(Index).Output = ">" & cboAddress485.Text & " " & txtOut.Text & vbCr
Sending with GPIB
‘ Create a global variable to hold a timer counter
Global GPIBResult as Integer
‘ Send the command in the command text box
TMWControl1.Output (txtOut(Index).Text & vbCr)
Sending with TCP/IP
' If tcp/ip1 is not connected, close it and tell the user
If tcpClient1.State <> sckConnected Then
'IP address "###.###.###.###"
‘ Set the address to the value in the address box
tcpClient1.RemoteHost = txtAddress(Index).Text
‘ Set the port to 5000
tcpClient1.RemotePort = 5000
While tcpClient1.State <> sckClosed
tcpClient1.Close
Wend
MsgBox ("TCP/IP1 is not connected. Please connect and try again.")
End If
' If tcp/ip1 is connected,
‘ Send the command in the command text box
If tcpClient1.State = sckConnected Then
tcpClient1.SendData txtOut(Index).Text & vbCr
End If
Page view 181
1 2 ... 177 178 179 180 181 182 183 184 185 186 187 ... 351 352

Comments to this Manuals

No comments