Real_to_Bytes.....

Begonnen von Emilg, 18. Juni 2015, 21:02:14

Vorheriges Thema - Nächstes Thema

0 Mitglieder und 2 Gäste betrachten dieses Thema.

Emilg

Hello

I have a problem with a ILC191, i use as a Profinet Device. Master is a Siemens ET200s cpu.
I want to transfer some real values from/to the master.
I have a Array of 256byes In/Out over Profinet.

If i want to transfer a Word/Int, is no problem. Just:
Profinet_Out[0] := Word.B1
Profinet_Out[1] := Word.B0 (*** I made the byte swap here ***)

But when i have the real value, i can't find a function blok to do the trick?
I can only find DW_to_Byte, where i find the 4 bytes, but then i missing the ","?

Is some body there have a solution?

- Emil

peewit

use the module "real_to_dword"

byte access:

byte0 = dword.b0
byte1 = dword.b1
byte2 = dword.b2
byte3 = dword.b3