You are on page 1of 4

First init of the COPRO:

Start your PCBridge program with PCB.EXE


Press O) OS-9 Terminal, to go in Terminal mode. Now you are online at the OS9 Terminal.
Press Return for login and you get a prompt ($ or os9)
(If there are any troubles connecting to OS9 Terminal check your comunication parameters, they must be
normally 9600 Baud)

Init the Ramdisk with the comand „mem_cfg“


Select option 1 for changing RAM Disk memory
Choose 3-, 64KB Blocks for the Ramdrive with option 3
Select option 4 for reboot the copro

Leave the OS9-Terminal, and go back to PCBridge with „F1“

Edit the file C:\INET\startine (maybe you leave PCBridge to start your personal editor program)
In „startine“ set the correct IP-Adress with the comand setip XXX.XXX.XXX.XXX

Send all files to the new Ramdrive with:


I) Internetutilities -> S) Setup OS9 Internet (wait while files will be sent to ramdrive)

Press the reset Button for starting the COPRO.


After reset, the startup file brings up OS9 with Iternetfunctions and starts the user Programs

In Terminal Mode ( O) OS-9 Terminal) you can check if the TCP/IP connection is running, the SERVER Prog
writes on standard output some information like PLCNumber BaseNumber, Connectionstatus, Receive-,
Sendinformation ...

HOW TO EDIT AND COMPILE:

File Structure:

C:\INET
Here must be all files, wich will be sent to the COPRO’s Ramdisk (Including Curve, Calc, Server)
You send them to the copro with the PCBridge Commands:
I) Internetutilities -> S) Setup OS9 Internet

Important files in c:\inet

SERVER executable Program for the TCP/IP connection


CALC executable Program for the O2/H2 calculation
CURVE executable Program for storing the archiv on the Ramdisk

You can edit these files here:


PASSWORD Passwordfile for OS9, actually there is no Password, see OS9 DOKU

STARTUP Batch File for starting the COPRO (like „autoexec.bat“)


Note: The „*“ in this file is only a remark

STARTINE Batch File for starting the OS9 Internet files


NOTE: With SETIP XXX.XXX.XXX.XXX you set here the actual TCP/IP Adress
Note: The „*“ in this file is only a remark

C:\OS9C
All files for the OS9C + Crosscompiler, Don’t edit them !!!
In C:\OS9C\UTIL you find usefull OS9 Utilities, for using them see the OS9 Doko. Note you must first send
them to COPRO‘s Ramdisk before you can execute them.

C:\PCBRIDGE
Here are all files for the Program PCBridge
PCB.EXE starts PCBRIDGE
The PCBRIDGE-Menue is written in a Script Language, if PCBridge is not running, you can edit the file
PCB.SCL for changing the Menue-Structure

C:\PCBRIDGE\C
Here is the sourcecode for the executable files
CALC.C
CURVE.C
SERVER.C
Note the source Code of SERVER is divided in 3 Parts:
SERVER.C Init COPRO, Init TCP/IP connection, mainloop Communication send + receive
PLCDATA.H Înclude File, functions for reading, writing the PLC DATATABLE
FUNC1.H Include File, functions for building the Communication Protokoll (SCC<->BCU, PLC)

How to change a Programm:


If you want to edit, compile the files, please first change in PCBridge your Active Directory with:
F) File Utilities -> A) Active directory change to: C:\PCBRIDGE\C

E) Edit the file (for example „curve.c“ )


B) (Re)Build the executable file (for example „curve.c“ ) Note: you get the compiled file „curve“

Remember: For sending all files to the COPRO Ramdisk, Copy „curve“ to the path C:\INET
F) File Utilities -> C)opy file („curve“ to „c:\inet\curve“)

Now you can send back all files to the copro with the PCBridge Commands:
I) Internetutilities -> S) Setup OS9 Internet

What does S) Setup OS9 Internet do ?


- change to rootdirectory /dd on the COPRO‘s Ramdisk
- delete the old SYS directory
- send all necessary programs (Internet files + user files) to the ramdisk
- give the setime comand to initialisize the multitasking os9 (later, time is taken from the PLC)

After pressing reset, the startup file is execute, and starts all programs. Note there are severall pause between
starting each programm, You can look for bootdetails in the file startup.
Speicherzugriff COPRO -> PLC

Programm calc.c:
Zyklisches lesen: P1 0-255 (Base A + Base B)
P2 0-100 (Base A + Base B)

Zyklisches schreiben: P1 01,02; P1 41,42; P1 86,87 (Base A + Base B)

Programm curve.c:
Zyklisches lesen: P1 0-255 (Base A + Base B)
P2 0-255 (Base A + Base B)

Zyklisches schreiben: P1 120-126 (Base A + Base B)

Programm server.c:
Zyklisches Lesen: P5 0-123 (Base A + Base B jeweils N98:0-123)

Ansonsten wird nur nach auf Anforderung vom Leitrechner gelesen oder geschrieben:
Aufträge vom LR in Hex:
x1, x2, x3, x5, x6, x7. (PLC Daten werden nur gelesen).
x9 ließt nur das file von der Ramdisk.

x41, x42, x43, x45, x46, x60 aktiviert/deaktiviert nur das monitoring
Das Monitoring selbst liest dann zyklisch die jeweilige Liste. (PLC Daten werden nur gelesen).

x87 schreibt keine Daten in die PLC sondern nur in den Datenbereich des COPRO.
Das Monitoring der Malfunktion (P7) erfolgt zyklisch und ließt nur. (PLC Daten werden nur gelesen).
Das Enable Bit 9 wird ausschließlich von der PLC selbst gesetzt.

x22 schreibt in N39:58,59; N39:60,61 (PLC Daten werden geschrieben !!!)

x81, x82, x83: P1 0-255, P2 0-255, P3 0-255 (PLC Daten werden als Block 0-255 geschrieben !!!)
x86: P6 0-123 (PLC Daten werden als Block 0-123 geschrieben !!!)

Allgemein gilt:
Der Schreibvorgang erfolgt nur, wenn der Leitrechner einen Auftrag zum Schreiben erteilt hat.
Der Schreibvorgang ließt zunächst den gesamten Block, modifiziert dann die Änderungen im Block und schreibt
anschließend den gesamten Block zurück.

Anleitung Update:
File CALC nach C:\INET kopieren
Files CALC CALC.C nach C:\PCBRIDGE\C kopieren

Anschließend kann die Änderung aus C:\INET z.B. mit ‚Send all files to the new Ramdrive‘ auf die Ram Disk
übertragen werden. (siehe oben)
Pinbelegung:

Cable for a 9-Pin IBM PC/AT to Control Copprocessor 9-Pin Comm0 Port

5 common --- 5 common


3 TXD --- 2 RXD
2 RXD --- 3 TXD
7 RTS --- 8 CTS
8 CTS --- 7 RTS
1CD--6 DSR --- 4 DTR
4 DTR --- 1 CD--6 DSR
9 N/C 9 NC

You might also like