Menu

#56 Add ability to decode 32bits encoded as float

1.0
closed
nobody
TODO (33)
2021-02-01
2019-09-25
jonarque
No

Discussion

  • elbar

    elbar - 2019-09-29

    Hi, there. Thanks a lot for your for your message.

    Best regards

     
  • elbar

    elbar - 2019-09-29
    • labels: --> TODO
     
  • jonarque

    jonarque - 2020-05-22

    Hello,

    I have started to look at implementing the float decoding in qmodmaster.

    I have started a pyModSlave with hex : 0, 0, 0, 3F80, 0, C000, AAAB, 3EAA (I found the value there : https://en.wikipedia.org/wiki/Single-precision_floating-point_format#Single-precision_examples )

    I tried to look for the number with modpoll (the command line utility and I get correctly :

    modpoll -m tcp -t 4:float -c 4 -1 127.0.0.1
    modpoll 3.7 - FieldTalk(tm) Modbus(R) Master Simulator
    Copyright (c) 2002-2019 proconX Pty Ltd
    Visit https://www.modbusdriver.com for Modbus libraries and tools.
    
    Protocol configuration: MODBUS/TCP
    Slave configuration...: address = 1, start reference = 1, count = 4
    Communication.........: 127.0.0.1, port 502, t/o 1.00 s, poll rate 1000 ms
    Data type.............: 32-bit float, output (holding) register table
    
    -- Polling slave...
    [1]: 0.000000
    [3]: 1.000000
    [5]: -2.000000
    [7]: 0.333333
    

    After a evening of work, I get the result attached (I have the same results as with modpoll). The code is always acticated, is full of duplicates, has no UI to choose the correct format (That is something I want your feedback for) and only manage one use case. In short, it is just a draft.

    For the UI, is it OK to add other "Data Format" options after "Bin, Dec and Hex" ?

    Thank you for your work !

    Best regards,

     
  • elbar

    elbar - 2020-05-23

    Hello, jonarque.

    Thanks a lot for your help and your code. I need to check out the UI code to decide how we could add this functionality . I could also give you access permission to upload your changes (if you like to do so).

    Best Regards

     
  • jonarque

    jonarque - 2020-05-24

    Hello elbar,

    I will be glad to have the right permissions to collaborate. I will need some guidance, as I'm not used to hg nor sourceforge (but I know git quite well and I also collaborate on several projects on Github, for example).

    Best regards,

     
  • elbar

    elbar - 2020-05-26

    Hello jonarque,

    i've gave you developer rights permissions. The easiest way to use Mercurial (https://www.mercurial-scm.org/) is to download TortoiseHg (https://tortoisehg.bitbucket.io/). You can fork the code or/and clone locally. Please let me know if everything is ok or you need more help.

    Best Regards

     
  • jonarque

    jonarque - 2020-05-26

    Hello elbar,

    Thank you for the permissions. I already managed to get a local copy of the repository. My question was more over the way to collaborate. It seems that hg doesn't have things like "pull request" (also known as "merge request"). I was wandering how you can give me feedback on the code I want to integrate in QModMaster. Should I create a specific branch and commit on this particular one and when the feature is ready, merge it into master (that can be your action) ?

    Best regards

     
  • elbar

    elbar - 2020-05-27

    Hello jonarque,

    i think that the best way to collaborate is to create a specific branch and commit on that.

    Best Regards

     
  • elbar

    elbar - 2021-02-01
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB