plc4
normal read/write (WRD/WWR) are limited up to 64 word
general command (MCM) allows
 read max 251word
 write max 247word

from yokogawa plc sales morimoto fax 03 3349 0626
thru taiyo keisoku tsukuba kobayashi fax 0298 57 4629

<URL:http://www-linac.kek.jp/jk/fam3/>
<URL:http://www-cont.j-parc.jp/members/furukawa/jk/fam3/>

=====
set P=plc4.current
tar cf - $P/README $P/MEMO $P/Makefile $P/Makefile.nonlinac \
 $P/plc4.c $P/plc4.memo $P/wrd-wwr.c | \
 gzip > $P/plc4-3.2.3.tar.gz


tar cf - plc4.v32/MEMO plc4.v32/Makefile plc4.v32/Makefile.nonlinac \
 plc4.v32/plc4.c plc4.v32/plc4.memo plc4.v32/wrd-wwr.c | \
 gzip > plc4.v32/plc4-3.2.tar.gz

=====
for v3.1

% ./plc4 -dd -l 1 -i 0 -h sbplc1 -q3
loop count = 1
sleep interval = 0
number of read data = 10
number of write data = 0
 Connected to sbplc1 on local port 3827 at Sat Jul  5 06:45:29.161 2003
## messge to be sent ##
0162,0400,0300,0000,
## messge received ##
00e2,6000,5053,3532,0000,0000,0000,0000,454c,3130,4003,524c,3130,0000,4441,3830,0000,4458,3436,4001,0000,0000,0000,0000,0000,0000,4459,3233,2002,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
SP25        
----        
LE01 i/o-64 
LR01        
AD08        
XD64  in-64 
----        
----        
YD32 out-32 
----        
----        
----        
----        
----        
----        
----        

% ./plc4 -dd -l 1 -i 0 -h sbplc1 -q 3:1
loop count = 1
sleep interval = 0
number of read data = 10
number of write data = 0
 Connected to sbplc1 on local port 4483 at Sat Jul  5 08:12:06.166 2003
## messge to be sent ##
0162,0400,0300,0100,
## messge received ##
00e2,6000,524c,3130,0000,4441,3830,0000,4144,3230,0000,4458,3233,2001,4459,3233,2002,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
LR01        
AD08        
DA02        
XD32  in-32 
YD32 out-32 
----        
----        
----        
----        
----        
----        
----        
----        
----        
----        
----        

 Disconnected local port 4483 at Sat Jul  5 08:12:06.186 2003

=====
for Cygwin

gcc -ansi -DMAIN -o plc4 plc4.c -I/home/furukawa/src/tcpip/s2.ansi -L/home/furukawa/src/tcpip/s2.ansi -ls2

=====
./plc4 -dd -h tgtplc -g vacplctgt -a D1000 -r 3

...

 Connected to vacplctgt on local port 2880 at Thu Sep 19 19:02:09.634 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0300,0400,0000,e803,
## messge received ##
00f1,0c00,0926,0800,0000,6500,6e00,6a00,
  101  110  106
 Connected to tgtplc on local port 2879 at Thu Sep 19 19:02:10.657 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0300,0400,0000,e803,
## messge received ##
00f1,0c00,0926,0800,0000,0000,0000,0000,
    0    0    0
 Connected to vacplctgt on local port 2878 at Thu Sep 19 19:02:10.670 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0300,0400,0000,e803,
## messge received ##
00f1,0c00,0926,0800,0000,6500,6e00,6a00,
  101  110  106
 Connected to tgtplc on local port 2877 at Thu Sep 19 19:02:11.689 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0300,0400,0000,e803,
s2_treceive: receive timeout
plcread -- timeout at send on 'tgtplc'
 Disconnected local port 2877 at Thu Sep 19 19:02:12.689 2002
 plcread4 error


-----
./plc4 -dd -h tgtplc -g vacplctgt -a D1000 -r 5

...


 Connected to vacplctgt on local port 3047 at Thu Sep 19 19:06:55.217 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
## messge received ##
00f1,1000,0926,0c00,0000,6500,6e00,6a00,0000,7100,
  101  110  106    0  113
 Connected to tgtplc on local port 3046 at Thu Sep 19 19:06:56.236 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
## messge received ##
00f1,1000,0926,0c00,0000,0000,0000,0000,0000,0000,
    0    0    0    0    0
 Connected to vacplctgt on local port 3045 at Thu Sep 19 19:06:56.251 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
## messge received ##
00f1,1000,0926,0c00,0000,6500,6e00,6a00,0000,7100,
  101  110  106    0  113
 Connected to tgtplc on local port 3044 at Thu Sep 19 19:06:57.294 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
s2_treceive: receive timeout
plcread -- timeout at send on 'tgtplc'
 Disconnected local port 3044 at Thu Sep 19 19:06:58.294 2002
 plcread4 error

-----
./plc4 -dd -h tgtplc -g vacplctgt -a D1000 -r 5 ; fdate
.....
 Connected to tgtplc on local port 3551 at Thu Sep 19 19:13:51.762 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
## messge received ##
00f1,1000,0926,0c00,0000,0000,0000,0000,0000,0000,
    0    0    0    0    0
 Connected to vacplctgt on local port 3550 at Thu Sep 19 19:13:51.782 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
## messge received ##
00f1,1000,0926,0c00,0000,6500,6e00,6a00,0000,7100,
  101  110  106    0  113
 Connected to tgtplc on local port 3549 at Thu Sep 19 19:13:52.834 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
s2_treceive: receive timeout
plcread -- timeout at send on 'tgtplc'
 Disconnected local port 3549 at Thu Sep 19 19:13:53.834 2002
 plcread4 error
Thu Sep 19 19:13:53.857 JST 2002
-----
% fdate ; ./plc4 -dd -h tgtplc -g vacplctgt -a D1000 -r 5 ; fdate
Thu Sep 19 19:15:56.230 JST 2002
...
 Connected to tgtplc on local port 3542 at Thu Sep 19 19:15:58.339 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
## messge received ##
00f1,1000,0926,0c00,0000,0000,0000,0000,0000,0000,
    0    0    0    0    0
 Connected to vacplctgt on local port 3541 at Thu Sep 19 19:15:58.353 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
## messge received ##
00f1,1000,0926,0c00,0000,6500,6e00,6a00,0000,7100,
  101  110  106    0  113
 Connected to tgtplc on local port 3540 at Thu Sep 19 19:15:59.372 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
s2_treceive: receive timeout
plcread -- timeout at send on 'tgtplc'
 Disconnected local port 3540 at Thu Sep 19 19:16:00.405 2002
 plcread4 error
Thu Sep 19 19:16:00.424 JST 2002
-----
% fdate ; ./plc4 -dd -h tgtplc -g vacplctgt -a D1000 -r 5 ; fdate
Thu Sep 19 19:17:37.908 JST 2002
...
 Connected to tgtplc on local port 3518 at Thu Sep 19 19:17:48.343 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
## messge received ##
00f1,1000,0926,0c00,0000,0000,0000,0000,0000,0000,
    0    0    0    0    0
 Connected to vacplctgt on local port 3517 at Thu Sep 19 19:17:48.358 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
## messge received ##
00f1,1000,0926,0c00,0000,6500,6e00,6a00,0000,7100,
  101  110  106    0  113
 Connected to tgtplc on local port 3516 at Thu Sep 19 19:17:49.376 2002
## messge to be sent ##
0171,0e00,0926,0a00,0200,0500,0400,0000,e803,
s2_treceive: receive timeout
plcread -- timeout at send on 'tgtplc'
 Disconnected local port 3516 at Thu Sep 19 19:17:50.376 2002
 plcread4 error
Thu Sep 19 19:17:50.386 JST 2002
-----
