SCL : string from db

Gouwtje

Member
Join Date
Nov 2012
Location
Breda
Posts
5
Hello everyone,

I have a question.
I'm using SCL code to create a function block.
With that function block I want to get from a DB 3 strings.

DB name is DB8000
DB adres 1 is: DB8000.DB 0.0 (STRING[12] Initial value MS1A)
DB adres 2 is: DB8000.DB 14.0 (STRING[12] Initial value S1A)
DB adres 3 is: DB8000.DB 28.0 (STRING[12] Initial value IO1A)

What I want is, when I insert in to the FB1 input ''MS1A'' that automatically MS1A and S1A and IO1A, these 3 strings as output will be written.

Sorry for my bad english

I hope someone can write a code, thanks
 
What is want is: If I typ MS1A that MS1A and S1A and IO1A frob DB8000 will be written in DB1504 as output string

1.gif

I must program 253 FB blocks for ESTOP modules. Thats why I ask if it is possible to automaticly written the MS / S / IO nummer in the output string. Because I use the DB's for WinCC
 
Last edited:
It is still not clear what you are trying to do - you did not mention 253 FBs in your first post. Get the whole story out please.
 
For a project I need to program the PLC and HMi panel (WinCC FLEX 2008)

I need to create a db for each emergency switch, so that they may be used in WinCC.

I have a db (db8000) where all ms / s / IO numbers are written

These are in order:
MS1A
S1A
IO1A
MS1B
S1B
IO1B
MS2A
S2A
IO2A
And so on

Structure function block must be:

If I during the programming of the function block in the input type MS1A should automatically search the MS / S / IO numbers and declare as output in the db for emergency switch 1

What I need is a function that automatically searches for corresponding strings in a DB (8000) and writes it into another DB that I can use for emergency switch 1
 
You are still describing addresses, names, strings etc.
But you dont describe what functionality you want to achieve. I dont mean how the internals of the program shall work. I mean what functionality you want to achieve by the program.
For example, nobody "needs" to create a DB. But maybe you need to generate an alarm text on the HMI.

(I am beginning to get an idea, but that is pure guesswork).

edit: This is what I think.
You have a large number of emergency stops, maybe 253 because you mentioned 253 FBs.
You need to display an appropriate alarm on the HMI for each emergency stop, including a suitable symbolic name to identify the stop button in question.
Of importance is to know if all the emergency stop buttons are wired to a single block of PLC inputs, or if they are wired to inputs that are mixed with other types of signals.
If the above is correct, then it is no big deal and there are appropriate methods to deal with it.
 
Last edited:
You're right,

I need the Ms numbers into an alarm rule to display when an alarm is active. And to minimize clutter we want everything from one emergency switch at each other. This means in the MS / S / IO number but also the status of the emergency and the subsequent action (eg reset or unlock or ..)
We want to simulate an alarm rule and the status of the emergency switch through different colors. All MS / S / IO numbers in Excel sheet supplied with all necessary switches.
 
You have to use the standard method of 1 alarm in the PLC = 1 alarm in the HMI.
In each alarm you simply configure the symbolic name (MS1A etc.) to be part of the alarm text.
To edit 253 alarms texts in WinCC Flexible is a chore. Much easier is to just configure 253 alarms with dummy alarms texts, export to CSV, edit the texts comfortably in Excel (with names and IO numbers etc.), and then import back into WinCC Flexible.
I do this all the time.
 

Similar Topics

I feel like I'm going crazy, new to Siemens, coming from AB, and I cannot get a dang string copied in SCL. This is a S7-300, V16 PLC. I have a...
Replies
10
Views
3,457
I am trying to take several individual CHAR bytes and turn them into a string. The CHAR bytes are located in a DB. I am trying to figure out the...
Replies
4
Views
3,489
Hi I am playing around with SCL & Strings, what is the problem with the string assignment VAR_TEMP MyString : STRING[20] ; END_VAR MyString...
Replies
5
Views
3,050
Hello all, my task is to send an array of ASCII codes through VIPA CP341. The device which I want to connect uses its own framing like this...
Replies
5
Views
8,106
Dear Sir, I try to write a function use SCL to read the string from a DB and convert it to real and transfer to another DB. But the simple...
Replies
34
Views
24,969
Back
Top Bottom