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
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