Real over Profinet to SIEMENS ET200s

emilg

Level-1
Beiträge
52
Reaktionspunkte
1
Zuviel Werbung?
-> Hier kostenlos registrieren
Hello

I have a ILC191ME/AN Profinet Device on a Profinet Network.
I have to transfer some REAL numbers to the Siemens Controller.
How do i do that?
Is there a function for that?
I'm using Profinet_Output[0] to 3? (Byte)

i have tested with Word to Siemens, and there is the bytes SWAPED, so i have to swap the bytes in the ILC.
I'm using this code:
Code:
Profinet_Output[10] := Word.B2;
Profinet_Output[11] := Word.B1;

Is there a smarter/easy'er way to do it?
 
Hello,

a REAL-Variable consits of 4 Bytes or 2 words. Please regard this !
Otherwise, I don't know another way to do the Transfer.

Greetings
Larry
 
Zuviel Werbung?
-> Hier kostenlos registrieren
Hello emilg,

please excuse our late answer ...

Real values used in the ILC are IEEE754 based. Same in the Step7 I think. If you used a Real_to_Word block
in PCWorx you will use all of your digits, because the block assumes that you want to convert from REAL to word.

For copying the consisting 4 Bytes of a REAL value into a PROFINET Buffer the REAL_TO_Buffer function block can be used,
which is a memory copy routine ...
On the Step7 you just need to remap the 4 Bytes in a REAL formated value.

Best regards
Markus v. Schlichtkrull
 
Zuletzt bearbeitet:
Hello

Thanks. I will try it later this week, and see if i can get it to work.

- Emil

Hello emilg,

For copying the consisting 4 Bytes of a REAL value into a PROFINET Buffer the REAL_TO_Buffer function block can be used,
which is a memory copy routine ...
On the Step7 you just need to remap the 4 Bytes in a REAL formated value.

Best regards
Markus v. Schlichtkrull
 
Zurück
Oben