OSCAT Forum

oscat.lib => oscat.lib fuer PC WorX/MULTIPROG => Thema gestartet von: Emilg am 18. Juni 2015, 21:02:14

Titel: Real_to_Bytes.....
Beitrag von: Emilg am 18. Juni 2015, 21:02:14
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
Titel: Re: Real_to_Bytes.....
Beitrag von: peewit am 18. Juni 2015, 22:30:21
use the module "real_to_dword"

byte access:

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