Search the Community
Showing results for tags 'integer'.
Found 3 results
Hello, I'm have some problems with the conversion of two integers to a floating point value. I have a modbus energy meter (SDM120) who works with 32bit IEEE745 floats values. In visilogic I receive two 16bit integers (MI); MI0 : 15643 MI1: -23069 I converted these integers to bits by the 'num to bit' function block. These are the converted value's : MI0 : 15643 --> 0011 1101 0001 1011 MI1: -23069 --> 1010 0101 1110 0011 If I put the two value's behind eachother I get the following binary code: 0011 1101 0001 1011 1010 0101 1110 0011 (MI0,MI1) When I fill in these binary code on a online binary to IEEE745 converter I get the following result: 0,038 This matches with the amps showing on the energy meter's display. The question is; How can can I make from MI0(15643) and MI1(-23069) a float in Visilogic So, MI0(15643) and MI1(-23069) -------------- some kind of formula -----------> MF0 = 0,038 Annyone who can help? Best regards, Jelmer
I'm trying to configure CANopen communication for a first time. NMT Status integer consists four values: 00, 7F, 05, 04. However when i press "Online test" the value is 517 (dec)?!?! - 205 (Hex). Please tell mi what it means, where is the mistake and how to fix it?
Hi, I have a Vision V1210 Controller that is supposed to read float values from pH meter over RS485 MODBUS RTU. All the communication is fine, using "Read Float Registers" FB the float value is stored in two consecutive MI registers (MI0 and MI1). I can see that retrieved value is 32bit float ordered big-endian (I believe that's IEEE 754) and I was wondering if there is some way to display it on screen? One way would be converting it to some integer representation so I can easily put it in a numeric box and use 1.2 decimal format (pH values should be in range 5.00-9.00), but I haven't found any ladder element for such conversion. Am I missing something obvious? It's worth mentioning that I don't need to do any calculations on these floats, just display them on screen. Thanks -- Petar.