Head banging S5 conversion help needed

Hi Jesper

Thanks for the reply and continued support it,s greatly appreciated... I took a step back and had a look at the old code again, I found a few things which may help.

Firstly, each PLC has it,s own address and DB associated with it and as Kalle pointed out each is using SSNR via a CP5431 card, the code I posted was for writing and receiving from the applicom card (pci profibus card in a pc)which is controlling the display of the wonderware software !!

there is more code which reads and writes to both the AR3200 plc and chair plc, the chair plc being the one hand drawn. the one being replaced is labelled as PRS 3i, last one on the profibus link so to speak next to the HMI screen.

all of the communications seem to revolve around 3 blocks in S5 calling different addresses or stations, the chair, other plc and screen and writing to / from there relevant DB blocks. The blocks are FB120 (send), FB121 (receive) and FB123 (control)

If I can find the blocks to replace these in S7 I,m pretty sure the application will work or be pretty close to working.

Unfortunatley I,m no expert in STL either so that in itself is throwing up all sorts of challenges !! Like LIR1, TIR and L BS

Link to AR3200

OPN DB 235 // OPEN STATUS WORD DATABASE
L DBW 66 // SEND STATUS FOR NODE 3
T MW 240 // STORE FOR COMM CALLS
//;
// CALL FB 123; // CHECK IF READY TO SEND
// *** Error in Line 8880 (PB 98): Block does not exist. ***
// ( $$IDENT := B#(0,0) // COM CARD #1
// , $$IDENT := B#(0,3) // JOB #
// , $$IDENT := MW 240 // JOB STATUS WORD
// , $$IDENT := MB 255 // ERROR BYTE
// );
//;
AN M 241.1 // IF READY TO SEND THEN
JCN X000
// CALL FB 120; // SEND THE DATA BACK
// *** Error in Line 8890 (PB 98): Block does not exist. ***
X000: NOP 0
// ( $$IDENT := B#(0,0) // COM CARD #1
// , $$IDENT := B#(0,3) // JOB #
// , $$IDENT := MW 240 // JOB STATUS WORD
// , $$IDENT := lok_kcpar [0] // GET FROM DATABASE
// , $$IDENT := B#(0,230) // DB230
// , $$IDENT := 0 // START AT DW0
// , $$IDENT := 64 // SEND 64 WORDS (MAX)
// , $$IDENT := MB 255 // ERROR BYTE
// );
//;
OPN DB 235 // OPEN STATUS WORD DATABASE
L MW 240 // STATUS WORD
T DBW 66 // STORE FOR LATER USE

I assume The $$IDENT is because the FB is not recognised...

Once again

Many thanks for your continued support

John Vincent
 
I haven't touched this ancient stuff the last 15 years, but I have a couple of things knocking on Alzheimers door:

The parameter for JOB number used to be defined in the Step5/COMNCM.
And I think it contained the comm.partner's node number and DB/DW address. Maybe also the TSAP name.

... and now I am waiting for more brain cells to connect regarding the S7 side....

Kalle

Hey, look here! chapter 3.5:
http://cache.automation.siemens.com/dnl/Tc/Tc1OTE3MQAA_45531547_HB/s7_s5s7b.pdf
 
Regarding the instructions LIR/TIR a.s.o. these are used to calculate and manipulate directly with the memory adresses. Sometimes for using the block copying commands TNB/TNW, or for access in the DBs that exeed 256 words length. There is no point in changing the instructions as this is not allowed n S7. I should think that the BLKMOV (SFC20) covers most of the use. You will also find LIR/TIR in communication blocks - and as you pointed, there are (too many!) equivalents in S7.

Kalle
 
... the code I posted was for writing and receiving from the applicom card (pci profibus card in a pc)which is controlling the display of the wonderware software !!
....
If I can find the blocks to replace these in S7 I,m pretty sure the application will work or be pretty close to working.

...
John Vincent



I think that the Applicom card used to come with some S5-communication FBs/DBs that had to be loaded/called in the PLC. I think the purpose was to improve speed and/or limit the communication parameterization.

It could be wise to contact Applicom and check out if they has got some kind of S5-S7 upgrade kit.

I have now reached and passed my memory limit by far.
Hopefully someone in the forum remembers more about this.

With a big grain of salt
Kalle
 
Hi Kalle / Jesper

It looks like COM NCM is the S5 equivalent to S7 hardware manager !!

I think I might have the solution to the communications between the other plcs using SFB 12 and 13, the code will be very similar to what I have now apart from one or two minor changes, well I,m hoping anyway.

Ive sent a e-mail to molex (applicom) and am waiting for a reply, I would suspect that there will be a GSD file for S7 and there application.

Unfortunatley I cant test any of my theory out until Monday when back at work.

Many thanks for your help so far

Regards

John Vincent
 
Last edited:
I think your first post is exactly the FB from Applicom.
The purpose is to define only one duplex DB-DB connection, and then they have made their own 'overlay' protocol with header info to be interpreted to query and write to other DBs and memory areas.


...
network: 1 fb l2_server pour ag 135u
ju m001
beu
m001: Nop 0
network: 2
opn db 150
an dbx 17.1
jc nowa
l dbw 2
inc 1
t dbw 2
l 10
>i
jc out
l 0
t dbw 14

....

here are the memory areas for inputs, outputs, markers, pws, dbs, dxs put into the
applicom comm. Db.

network: 3
opn db 150 //
l w#16#ee00
t dbw 300
l w#16#ef00
t dbw 302r
l w#16#ef80
t dbw 304
l w#16#f000
t dbw 306
l w#16#f100
t dbw 308
l w#16#ec00
t dbw 310
l w#16#ed00
t dbw 312
l w#16#e400 //
t dbw 314
l w#16#0
t dbw 316
l #ssnr #ssnr -- ssnr
t dbw 290
l #anr #anr -- anr
t dbw 292
l #anzw #anzw -- anzw
srw 8
l 0
==i
jc mem
// l bs 34;

...



hi
 
If I am not mistaken, to preserve the profibus/Applicom connection with the new S7 PLC, you would have to have a CP342-5 card that can speak FDL/Send-Receive (AG_SEND/AG_RECV). Exactly what S7 PLC will you be using ?

Another idea:
What kind of PC application is the Applicom card serving ?
If it is a reasonable uptodate HMI or SCADA software, maybe you can switch to a driver that speaks S7 directly.
And while you are at it, switch over to ethernet. In the long run, you have to convert to Ethernet anyway, so why not take the step now.

Possibly your new S7 PLC has ethernet onboard (shame of you if it does not), so you dont have to add neither a CP343-1 or CP342-5 card.
 
Gents

Not quiet sure what happened, responed last night but the post does,t show...

Jesper, the card is serving intouch wonderware running on an XP machine. I also have two possible plcs to use, a 317 2pn/dp and a 317 2dp. I,m thinking the ethernet route will be best, I also have 2 ethernet to fiber media converters just in case.

Regards
 
Gents

I also have two possible plcs to use, a 317 2pn/dp and a 317 2dp. I,m thinking the ethernet route will be best, I also have 2 ethernet to fiber media converters just in case.

Regards

Go for the 317 2pn/dp so you get the Ethernet port for programming (on-site and remote) and replace the router.

The CP5431 is a Profibus FMS card, here is some information about communication between S7 and S5 systems with Profibus FMS
http://support.automation.siemens.com/WW/view/en/48066532
 

Similar Topics

Hello have a BK9055 which is driving me nuts... Just want to allocate the IP address, but is fighting me. Am using KS2000 to configure, and have...
Replies
1
Views
1,319
Good Afternoon , I'm sure there are many Ishida Muti-Head Weigh Systems . We have a Ishida CCW-M-214W Multi-Head system . We are...
Replies
1
Views
538
Hi all, have a project which requires reading a weigh head weight over ASCII. Never really touched ascii so struggling a bit. The weigh head is in...
Replies
11
Views
1,243
Good Morning , We have a Ishida Multi-Head Scale . I had experiece with them for chips , crackers , etc. , but now we are using them for...
Replies
7
Views
466
Hello expert I have migrate legacy project that use Applicom OPC DA with 3rd client and S7-400. I see in client code add item string call...
Replies
0
Views
368
Back
Top Bottom