S7 224 - Storing String variables in a program

ltrail

Member
Join Date
Sep 2003
Location
Pennsylvania
Posts
25
Folks. I have a S7 PLC with a security program to monitor doors, temperature (analog), electric service voltage (logic). I have a Siemens TP070 HMI that displays the various values. However, the string output function to the TP070 requires string variables located in the S7 memory. I've not discovered a MicroWIN software method to introduce such. I see all kinds of manipulative functions to work with string variables, but not how to embed them. I believe that I just need a jump start here.

As an example, I'd like to call, say, VB20 to be "Front Door Ajar". Or, VB50 to be "No Electric Service", VB60 to be "Electric Service Normal".

Would someone give me pointers to establishing these string variables embedded into my S7 program? Thanks
 
Been a while, but i'll give it a go! In the DATA BLOCK of the S7224, you need to define the messages you want to display on the TP070 (ie - VB10 'MOTOR 1 TRIPPED') - next address would be VB25.
Then in the TP070 create a tag using the STRING data type (set the string length long enough to display the WHOLE message!) - setting the tag's address to VB10 (eg).................Think that should do it?!! :nodi:

All i will say, is you have a lot of messages to display, sketch out the data block first - otherwise it gets real messy & difficult to organise (speaking from experience!!)

Happy to post a sample if needed.
 
I would setup a string tag in the TP070 and have it be the max length of your message, starting at address VB0. If your max lenght was 25 bytes, I would put the first message at VB25, and it would be 25 bytes long, or shorter if needed. The next message would statrt at VB50, etc. Then in the PLC, when I needed to display a message I would use the "copy String" command and move the string from say VB25 thru VB 49 to VB0 and it would display. If you want to blank out the message, just fill a 25 byte string with spaces and move it into VB0 when there are no messages.
 
I understand

thanks for your example. It provides me with a clearer understanding of the Data Block effort and the TP070 tag. Sometime I'll upgrade my HMI, but this will have to do for now.
 

Similar Topics

I have a Siemens S7-200 with a bad output. Bought a new processor, PN 6ES7 214-1AD23-0Xb0, to replace it. I have an EPROM Memory Module, PN 6ES7...
Replies
2
Views
790
Hi, Anybody has experience about setup communication between O2D224 camera and 1768-L43S PLC? My PLC software version is 19.11. Please let me know...
Replies
7
Views
1,808
Hello everyone... I'm working on a project where I want to use the time of the PLCs to do a specific process. In both PLCs (cpu 224 & cpu 315)...
Replies
10
Views
4,306
Hey everyone, I apologize if this question has been answered previously. I need to replace the battery in SIMATIC S7-200 (CPU 224...
Replies
2
Views
4,707
Back
Top Bottom