PC to PLC Protocol

TheRixta

Member
Join Date
Sep 2002
Location
MA
Posts
7
Hi,
I am new to this site, it looks very helpful. I have plenty of experience with VB/C and have written complete appications for high speed robotic systems. My problem is they want me to use GE Fanuc PLC control on a system instead of the NIDAQ or GPIB cards I am familiar with. I would like some advise on how my VB language sends instructions to the PLC ie, 9030 or 9070. I am familiar with Versapro ans LM90 to program the PLC but I need to know what is the protocol for instructing the PLC from my PC application. Do I load multiple projects on the PLC then run them when required or load a new project based on the recipes conditions?

Rick.
 
Depending on the model, 90-30 and 90-70 PLCs can communicate serially via Modbus (RTU), CCM, or SNP protocols or just ASCII data. You can purchase any of the protocol drivers (or write your own) and include them in your VB aplication.

The PLC will only accept one program at a time, but the program can consist of multiple subroutine files which can be conditionally called from the main program.

If your programs contain a repeatable sequence of moves, but the target distances for each move vary from program to program, you can download recipes as needed or you can save recipe data in the PLC and apply it as needed.

I recently completed a project where the PLC controlled positioning the backstop for a guillotine cutter. There were several distinct sequences such as trimming all four sides, cutting a block into two smaller blocks, cutting a block into four smaller blocks. The PLC was organized around subroutines for each of these trim plans.

There could also be different sizes within each of the trim plans, so each subroutine also included a recipe table of the sizes encountered in actual prodution.

If you can post the specifics of you application I'm sure we can answer more of your questions.
 
I'll answer your questions in reverse order.

Do I load multiple projects on the PLC then run them when required....
The PLC can only have one program loaded at a time.


... or load a new project based on the recipes conditions?
No. Your VB program will not "know how" to download a program. That's what the Versapro software is for. While GE has released some of the protocols for talking to the data memory space of the PLC, the program space is closed, proprietary and off-limits.


I would like some advise on how my VB language sends instructions to the PLC ie, 9030 or 9070. I am familiar with Versapro ans LM90 to program the PLC but I need to know what is the protocol for instructing the PLC from my PC application
What you will be doing is sending numbers/bits to the PLC, and reading them back. The communication link is likely to be slow (compared to PLC scan), so you'll want to let the PLC handle as much of the decision making as possible.

As far as handling multiple recipes, there are several techniques:

1) The Sequentia S-88 approach: The process will be divided into small, self-contained operations called 'phases'. I've tried to find a clear, plain-English definition (as opposed to ISA's definition) of a phase, but have so far been unsuccessful. Tyupical phases are "Get material X from this spot to that spot", or "Heat the tank to this ramp profile". There is usually a setpoint associated with a phase (there may be more than one, such as agitate for this TIME at this SPEED ramping at this RATE. The TIME is the key one - it lets us know when the phase is done)

Your VB app will then send the PLC a bunch of numbers in a predined location (e.g. TIME, SPEED, RATE) and tell the phase to run (a bit in a memory register). The phase will do it's thing, and your VB app will monitor a bit and wait for it to say "I'm done - what's next?). Your app then launches one or more phases.

By modularizing the process, you give great flexiblity to recipes
.
.
2) PLC-driven batch engine: The same basic approach, but the engine that determines the order is in the PLC - the PC just downloads all the setpoints at once, and then sets the GO bit. The PLC takes over from there.

The nice thing about this approach is that the PLC is a lot less likely to hang (or lose comms with the PLC) than the PC. Once the batch is running, it keeps running, pausing only for pre-defined operator interaction.

You don't have to limit it just the setpoints. If the order of the phases changes in a recipe, that can be downloaded too.
.
.
3) Multiple Recipes in the PLC: PLCs have subroutines, which can be called (or not) as programming requires. You could create a subroutine per recipe, and then pass the PLC a number, and the PLC will be programmed to only run that subroutine, and not others.

4) Repicpe specific actions. Variations on all of the above. You pass the PLC the recipe number (or set of numbers). Various sections of PLC code are written "If RecipeNo = 5, do this, if RecipeNo = 6, do that, If RecipeNo <> 5 and <>6, do something else.

That's all I can think of off the top of my head. There are many more approaches, I'm sure.

Again, the principle is that the PLC code does not change, but you pass the PLC numbers/bits to enable/disable logic.
.
.
I have plenty of experience with VB/C and have written complete appications for high speed robotic systems. My problem is they want me to use GE Fanuc PLC control on a system instead of the NIDAQ or GPIB cards I am familiar with.
I have no idea even what NIDAQ or GPIB cards are, so we may have some serious communication gaps.

One of the hardest concepts for a VB programmer to understand when dealing with PLCs is the concept of SCAN. The PLC program does not start and stop like a VB program. It's the Energizer Bunny - it keeps going and going and going.... In VB, you typically open a file, crunch some numbers, load them into the file, close the file, and quit. The PLC program opens the file (reads Input modules) runs ALL the logic (unless specifically told not to), write to the file (writes to the Output modules), and then does the whole thing over again.

When you code, you need to mentally keep track of what's going to happen on the next scan to logic ABOVE the rung you've writen (which won't be affected THIS scan).

If you haven't yet, order Phil's excellent book (blatant plug), and go through the online tutorial. PLC programming is different from VB or C coding.


Hi,
I am new to this site, it looks very helpful.
Welcome.
Thanks, we like it.
 
Last edited:
PC to PLC (the app)

Thank you for the help so far. The application is quite complex. It is a twin module PVD tool (Pressure Vapor Deposition). This tool is a high vacuum tool that sputter deposits thick Al03 films. Approximately 160 cannnels of I/O and 20 RS232 comms required. As the tool is used for many products the Recipe Editor would typicaly hold up to 100 unique recipes. I have already created the GUI and was all set to use NIDAQ cards (National Instrument) when I was told PLC was required for improved throughput. I had just finished a long week of recovering the operating system on a 4.7 million dollar tool that had GE Fanuc PLC but used State Logic which is no longer supported. So I have to bite the bullet and dive head first into becoming truely PLC proficient. Where could I find the VB PLC drivers?
 
Either of these have drivers for sale.

http://www.kepware.com
http://www.parijat.com

I have a VB application that I got from GE called GEFCommVB. I can't seem to find it on their website any more. It's a 1.5 meg zip file, so if you want me to email it to you, contact me via the private message section of this forum. The document that comes along with it declares that it's not a GEFanuc product, and not copyright protected.
 
Steve, I was looking for the file as well and could not find it. It came up in some search engines but didn't appear on the pages they linked to. They must have removed it from the site. There are a couple other files I downloaded as well that I couldn't find.
 
GE Fanuc State Logic

Rixta,
You may want to contact your local GE Fanuc rep. and have a little talk.
Cimplicity ME which is GE Fanuc's Programming software for PC (NT or CE), PLC, Motion, Etc. does indeed support Stat Logic. It is the Adatek software re-done into the new GUI. There are some differences and not everything is yet supported but it is there.
You could also use the NT Control software and integrate thier control and you VB into one Computer. There are too many options to go over them all here. Talk to you local distributor or rep. to get demo software and hardware to use for up to 90 days.

Go to the GE Fanuc web site ( www.gefanuc.com ) and check it out, or thier forum ( http://gefanuc.bnsi.net/eforum/index.php?s= )for more detais.

If you want GEFCommVB as mentioned above and need the Source for it, let me know.
 
TheRixta said:
Hi,
I am new to this site, it looks very helpful. I have plenty of experience with VB/C and have written complete appications for high speed robotic systems. My problem is they want me to use GE Fanuc PLC control on a system instead of the NIDAQ or GPIB cards I am familiar with. I would like some advise on how my VB language sends instructions to the PLC ie, 9030 or 9070. I am familiar with Versapro ans LM90 to program the PLC but I need to know what is the protocol for instructing the PLC from my PC application. Do I load multiple projects on the PLC then run them when required or load a new project based on the recipes conditions?

Rick.
iWANT TO LEARN ABOUT PLC
 
Steve Bailey said:
Either of these have drivers for sale.

http://www.kepware.com
http://www.parijat.com

I have a VB application that I got from GE called GEFCommVB. I can't seem to find it on their website any more. It's a 1.5 meg zip file, so if you want me to email it to you, contact me via the private message section of this forum. The document that comes along with it declares that it's not a GEFanuc product, and not copyright protected.
hi steven i want to email me :[email protected]
 

Similar Topics

Hi all Trying to remotely connect to a TIA Portal PLC. I can ping it without a problem but can't get my software to connect. I've opened port...
Replies
8
Views
265
Hello Guys, I have a packaging machine in the company that I work for that have 8 Omron VFDs (3G3MV ) that are controlled via Modbus with CJ1M...
Replies
1
Views
574
Dear guys, I have a software that sends data to PLC using modbus. I want to connect my software with siemens plc, how can i do that?
Replies
19
Views
4,483
Hello, this is a brand new task for me. I recently bought a particulate sensor and it communicates with UART protocol or I2C protocol. It came...
Replies
12
Views
2,695
Hi, I had a client upgraded their system to use a set of redundant PLC system with GE PLC CPE400, and a Citect 8.0 (2016) SCADA to get data with...
Replies
0
Views
1,429
Back
Top Bottom