# Serial Communication Application

B

#### Burda, Jason M.

I have to interface via serial connection to a GE 90/70 PCM card or otherwise from a weigh scale pc...however the weigh scale people do not have a driver to support the GE 90/70 PLC. Any suggestions on how to do this with a PCM card?

T

#### Thomas Swift

The PCM module communicates via RS232 using ASCII protocol. As you probably know, the PCM is programmed in BASIC using TERMF (or HyperTerminal). The module has an I\O buffer that is available for use with ASCII strings. You will need to download the PCM manual (GFK-0487) and the megabasic programmers user manual (GFK-0256) from GE's website. www.gefanuc.com

I

#### Ian Lippert

Jason,
I have done this before with Toledo and other scales, and it is relatively simple. It requires writing a routine in the Megabasic that the 90-70 PCM uses. The PCM can easily do ASCII string manipulations and input/output using RS-232 or 485. The Toledo manuals are relatively helpful about the control characters and sequences you will need. Most other scales have
comm. manuals that are available to order. You will require the PCOP/TERMF software that integrates with the Logicmaster software. There are examples of serial communication plus the PDF files of the PCM and Megabasic manuals on the GE Fanuc website. A couple of things to check:

1. scale serial ports often use 7 instead of 8 data bits (PCM can be configured easily)
2. get an opto-isolator in-line at the GE 90-70 PCM end, they used to be susceptible to noise, and ground differentials if grounding isn't wired
carefully.

Ian Lippert
Lippert Design & Integration Ltd.
Nanaimo, B.C.

S

#### Steve Bailey

Does the scale support RTU (modbus)? If so, you can use the CMM711 module instead of the PCM. Less money, and you don't have to write a driver.

N

#### Nick Pirog

In the applications we service we put an operator interface in. It is used as an HMI to both the PLC and the weigh scale, and in the background it
passes data from the weigh scale to the HMI.

Best Regards,

Nick Pirog
CPU Automation, Inc.
Voice: 978.692.5404
Fax: 978.692.8844
email: [email protected]com
web: www.cpuauto.com

D

#### Darold Woodward

I've been through writing a custom driver before and it generally goes either really well or really poorly. Since you can get a Modbus master communication module very easily, I suggest checking to see if you can get a Modbus interface
on the scale.

With a quick search on the Toledo-Mettler website, I found references to Modbus and other protocols. Getting two Modbus devices to talk is often a lot less work than programming for a custom protocol interface.

Darold Woodward PE
SEL Inc.
[email protected]

B

#### Burda, Jason M.

Thanks for the info....got any generic/specific code you can send me. Also, I am using the jag extreme as my scale device....is there any way that you know of to simulate a weight so that I can test all this off line to make sure I can get the weight into the PLC. Maybe you even know of a way I can run the new (Scale to PCM) system in parallel with the old system. This is all (serial communication and PCM programming) greek to me. Thanks again.

T

#### Thomas Swift

The CMM 711 can be a RTU SLAVE ONLY!

B

No it does not

B

#### Burda, Jason M.

Thanks, but I am really looking to eliminate third party software and go directly via serial link to the PLC. From there it is real easy to get into our HMI/Level 2 control system.

I

#### Ian Lippert

Whoa... it doesn't require custom drivers. I agree custom drivers can be painful, but this is simply serial ASCII communication to the serial comm. interface built into the scale. The scale firmware responds to polling or initiates an output of ASCII characters. Could be done with good old Procomm. In this case, the PCM simply brings the data into the PLC, when it's needed and puts it where it's useful.

IMHO, it's pretty rare to get a Modbus interface on scales, whereas it's rare to not get an ASCII serial comm. port.

Ian Lippert
Lippert Design & Integration Ltd.
Nanaimo, B.C.

T

#### Thomas Swift

here is a sample ASCII read.
rem comport settings
10 setcom #9600,E,8,1,N
rem set string length
15 string 200,20
17 set input 1,0,28
20 input #$(0) 40$(0) = inkey$# rem look for a string 50 IF$(0)="" then 40
rem look for end of string, "A" will be what ever the scale sends for EOS
60 IF$(0)=<>"A" then 20 70$(0)=inkey$# 80 IF ASC ($(0),1) = 0 then 70
90 out (0)=ASC (\$(0),1)

A

#### Anonymous

IMHO, it's pretty rare to get a Modbus interface on scales, whereas it's rare to not get an ASCII serial comm. port.

Ian Lippert
Lippert Design & Integration Ltd.
Nanaimo, B.C.