communication of GE Fanuc PLC through RS-232

A

Thread Starter

Anonymous

I'm a student, I'm using visual basic programming to control a PLC through RS-232 serial port. But I don't know what is the message I have to send out to command the PLC output.

This is my coding:

Private Sub Command1_Click()
MSComm1.CommPort = 1
MSComm1.Settings = "9600,n,8,1"
MSComm1.InputLen = 0
MSComm1.PortOpen = True

MSComm1.Output =

MsgBox MSComm1.OutBufferCount
MSComm1.PortOpen = False
End Sub

The PLC I'm using is GE Fanuc VersaMax.
 
Dear my friend!

I don't know more about Visual basic but i have some idea:

+ message which you send to PLC as ASCII character, and you must write sub function in PLC to receive it

+ in PLC have many sub funtion for comunication ex FB5, FB4

can i become your friend. Please contact with me: [email protected]
 
T

Thomas Hergenhahn

The PLCs "speak" using a proprietary protocol (no ASCII or human readable chars). GE Fanuc's protocol is named SNP or SNPX. Search their web site for these things, I remember there is some documentation on it.
 
D
Anonymous,

What you need to send will depend upon how the RS-232 port on the VersaMax CPU is configured: Serial I/O, Modbus RTU Slave or SNP Slave. The first, Serial I/O, is simply ASCII, but you'll need to do some programming in the ladder to make it work.

The default configuration is SNP Slave; the SNP protocol can be rather complicated to program and there are few, if any, public domain programs that you could use as templates.

Modbus RTU Slave is a popular protocol that is well doucmented in the technical literature and on the Schneider web site.

For the simplest solution, I suggest you consider the Serial I/O solution. There are examples of Serial i/o communications in the technical manuals on the GE Fanuc Web Site (http://www.geindustrial.com/cwc/gefanuc/TopBarSupport.html).

Once you decide on the protocol for the port, then you'll need to do your VB coding. Sorry, but I can't help you with that.

Drake Fink
GE Fanuc Automation
 
Top