S7-200 Print queuing

Gazzr

Member
Join Date
Nov 2006
Location
UK
Posts
64
I have been struggling to transmit multiple messages to a serial printer with S7-200. I seem to have overcome this with the attached program, but would appreciate it if anybody vould cast an eye over it and tell me what they think of it, or if they can recommend a better way.
Also I don't know if I have used the local variables correctly...?
And lastly, in the subroutine I transmit tables VB100, VB200 etc... Is there anyway I can pass these addresses into the subroutine via the local variable table? So I could use the same subroutine to transmit a completely different set of tables.

Thanks in advance.
 
Gazzr said:
Is there anyway I can pass these addresses into the subroutine via the local variable table? So I could use the same subroutine to transmit a completely different set of tables.

Thanks in advance.

You could use indirect addressing and pass a pointer to the subroutine.

As when using the transmit command you can use indirect addressing as follows:-

XMT *AC1, 0
 
Last edited:
Gummit said:
Hi Gazzr,

Just out of interest, can you tell me about the printer? Reason I ask is I sell a panel mounting printer with Siemens protocol http://digital-instrumentation.co.uk/printers.aspx

Cheers
Rob
The printer I have been using is a Citizen iDP3550. It was the only serial printer I was able to find. Had to "borrow" out of a machine in service.... Nobody's noticed it's missing yet..
I first tried communicating with a parallel printer but without any success. (Although I can not be certain that the parallel printer isn't faulty)
When you say the printer you sell has "Siemens protocol", what is that exactly? And how would you configure a graph to print as in the display picture of the unit?
 
504bloke said:
You could use indirect addressing and pass a pointer to the subroutine.

As when using the transmit command you can use indirect addressing as follows:-

XMT *AC1, 0
I see what you are saying.... That would work, I could just set up the addresses in the network that initializes the print subroutine.
Hmmm, food for thought. Thanks.
Other than that, have I used the local variables correctly? As I am never sure when to use in , out , in/out ,or Temp etc... I usually just mess around untill it works, in the hope that one day the penny will drop and it will all come clear. The explanation in the manual doesn't help much either. If I remember correctly, they only have about 1 small paragraph on the subject.
(Although I must add, the manual in general is very good)
 
Gazzr said:
I see what you are saying.... That would work, I could just set up the addresses in the network that initializes the print subroutine.
Hmmm, food for thought. Thanks.
Other than that, have I used the local variables correctly? As I am never sure when to use in , out , in/out ,or Temp etc... I usually just mess around untill it works, in the hope that one day the penny will drop and it will all come clear. The explanation in the manual doesn't help much either. If I remember correctly, they only have about 1 small paragraph on the subject.
(Although I must add, the manual in general is very good)

IN - Variable going INTO the Subroutine
OUT - Variable going OUT of the Subroutine
INOUT - Both of above
TEMP - Local variable used within the subroutine only and cannot be accessed from elsewhere

You variables IN/OUT and TEMP look ok
 
Last edited:
Gazzr said:
The printer I have been using is a Citizen iDP3550. It was the only serial printer I was able to find. Had to "borrow" out of a machine in service.... Nobody's noticed it's missing yet..
I first tried communicating with a parallel printer but without any success. (Although I can not be certain that the parallel printer isn't faulty)
When you say the printer you sell has "Siemens protocol", what is that exactly? And how would you configure a graph to print as in the display picture of the unit?
I'm sorry I didn't explain myself clearly. What I meant to say was that one version of this printer supports XON/XOFF protocol to connect to a Siemens PLC.

I do not know a great deal about PLC's and protocols but my understanding is that XOFF sent from the printer would tell the PLC to stop sending and then when it is able to receive again it sends XON. As you are struggling to send multiple messages to your printer, this seemed relevant.

I hope I haven't muddied the waters for you.

Cheers
Rob

P.S. As for the graph, these printers can accept and print graphic images such as .bmp .jpg and .tif
 
504bloke said:
IN - Variable going INTO the Subroutine
OUT - Variable going OUT of the Subroutine
INOUT - Both of above
TEMP - Local variable used within the subroutine only and cannot be accessed from elsewhere
Sounds simple.
Added indirect addressing, but not tested yet.
See attached.
 

Similar Topics

Hello, I was wondering if anyone would be able to help me out; I have a PLC2 file that I can't access (I don't have the software). Would anyone...
Replies
3
Views
789
Hi! I´m wondering if anybody has some spare time to help me print a little S7-200 program to pdf? I haven´t worked with the 200 system and don´t...
Replies
3
Views
2,103
Dear Sirs, How can we get the temperature values from printer using communication b/w TD-200 (Rs232c) - Printer (Lpt)while the temp values are...
Replies
1
Views
2,825
Hi. I have a 222 CPU. I need to recover the program from the eeprom memory. Is it possible?
Replies
1
Views
93
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
256
Back
Top Bottom