Sonstiges Copying Structure into String Variable ANSI C

Dejo

Level-2
Beiträge
14
Reaktionspunkte
1
Zuviel Werbung?
-> Hier kostenlos registrieren
Hi guys,

I have a little problem here...I'm currently working with B&R and I'm creating a project in ANSI C. The problem that I have is to following:
How can I copy the entire content of a variable (which is a structure) to a single variable (which is a String). For example:
VAR
StringVar : STRING[400];
Message : statusProperties_typ;
END_VAR

where
TYPE
statusProperties_typ : STRUCT
TextVar1 : STRING[80];
TextVar2 : STRING[80];
TextVar3 : STRING[80];
END_STRUCT;
END_TYPE

Now, I want to copy the content from the structure Message into the variable StringVar. How can I do that in ANSI C?
I know how to do it in ST, but with ANSI C i have problems...
In ST it should look like:
StringVar := 'Message'; -> whit this the entire content of Message is copied into the variable StringVar.

can anyone give a tipp or two?

Thanks
 
Zurück
Oben