3/9/2020 9:29 PM | |
Joined: 12/18/2014 Last visit: 11/18/2024 Posts: 34239 Rating: (4263)
|
The addressing in the VM memory of the LOGO! is byte-oriented. You have to enter the 32-bit float value in the LOGO! in 4 bytes e.g. Transfer VB0 to VB3 (VW0 + VW2). To convert, use the F / I converter and enter VM0 as the address. In the opposite direction you take the I / F converter to make the integer number of the LOGO a 32 bit real value. Then you enter e.g. VM4 on (VB4 to VB7 or VW4 + VW6). You then have to transfer the 4 bytes to 2 Modbus registers. AttachmentTest.zip (161 Downloads) |
3/9/2020 10:14 PM | |
Posts: 42 Rating: (1) |
Hi ixo65, thanks a lot for your answer! I already use VM=0 adress at the float/integer converter as you will be able to see in my code, but i don't get anything. I didn't understand very well the part where you say "You have to enter the 32-bit float value in the LOGO! in 4 bytes e.g. Transfer VB0 to VB3 (VW0 + VW2)". Transfering data from HR=11 to VW0 (long =2) don't i already have the data in VB3? If i check the data table i see the bits from V3.0 to VB3.7. (I only receiveng float data until 255). I add my LogoSoftComfort code. AttachmentLogoClientValue.zip (138 Downloads) |
3/10/2020 8:44 AM | |
Joined: 2/22/2008 Last visit: 11/18/2024 Posts: 2698 Rating: (208) |
See attachment for an example for float and double with message to see a result. The program is created as diagram instead of a network project. If i have only one Modbus partner, i don't create network projects. But this you must do as you prefer. In your program delete the entry with the direction from Logo to Modbus, if you are not sure, that the holding register (HR) is writeable without risk. In my example play with the HR numbers +/-1 or anything else to get an appropriate value. Also change IP addresses as you need. Regards, Scorp AttachmentFloatDouble.zip (167 Downloads) |
This contribution was helpful to1 thankful Users |
3/10/2020 8:47 PM | |
Posts: 42 Rating: (1) |
Hey, thank you very much to everyone who have answered. I will try that. |
Follow us on