Hello for all,
I would like to know how is possible to send or recieve real number by inputs/outputs?
Thanl you!
Hello for all,
I would like to know how is possible to send or recieve real number by inputs/outputs?
Thanl you!
First you will need to create a SIGNAL declaration for the I/O and an REAL.
SIGNAL your_output $OUT[1] to $OUT[8]
REAL your_value=1.1
Then,
your_output=your_value*10
This will send 11 to your PLC which if you divide by 10 will give you 1.1.
This means that you only actually send an integer over the network.
Sent using Tapatalk 4
Display More
First you will need to create a SIGNAL declaration for the I/O and an REAL.SIGNAL your_output $OUT[1] to $OUT[8]
REAL your_value=1.1
Then,
your_output=your_value*10
This will send 11 to your PLC which if you divide by 10 will give you 1.1.
This means that you only actually send an integer over the network.
Sent using Tapatalk 4
Yeah, right.
But you can face some problem and you have to notice that Real type of variable is 4 byte length.
So, in KSS there are big-endian memory mapping, but, for example, Siemens PLC uses little-endian mapping.
Therefore you need to convert (to reverse) plc variable that you recieve from KSS.
So, in KSS there are big-endian memory mapping, but, for example, Siemens PLC uses little-endian mapping.
Therefore you need to convert (to reverse) plc variable that you recieve from KSS.
I think it maybe the other way around, but there was an option on KSS5 for the KRC to manipulate the conversion, I guess this is also true of KSS8.
This is only an issue with Motorola based PLC's....