knoterich / force-logger

0 stars 1 forks source link

Loadcell Config Dialog #8

Open knoterich opened 4 years ago

knoterich commented 4 years ago

Configures the loadcell over wifi. The commands are avaialbe here: https://github.com/knoterich/force-logger/wiki/Load-Cell-Protocol

krameler commented 4 years ago

The documentation is unclear about how the commands (and arguments) to the Loadcell should be formatted. Also there aren't any units for the arguments specified.

knoterich commented 4 years ago

The units should be N. Maybe we can add support for automatic conversion (N, kg, g, lb, oz, %Normbunny^^). The commands should be send as strings one by one with '\n' delimiter. The cell is going to answer with an ack.

krameler commented 4 years ago

Still too unspecific!!: How do i seperate command and argument? Are floats supported? And if: How? What about time units?

But yes automatic conversion would be a handy front-end feature

knoterich commented 4 years ago

For more clarity a flow of calibrating the scale:

Server:set\n //sets the calibration value to 1 so the cell reads raw data Client:ack\n Server:tare\n //tares the scale Client:ack\n (now you place a known weight on the scale) Server:cal\n Client:ack\n Server:1234.9876\n //the cell doesn't care about the unit and accepts a float with an '.' as the decimal designator Client:Calibration factor = 56743 ack\n //the calibration factor is the internal factor and not the known weight

At the moment the delimiter is set to '\n' but can be pretty much any ASCII character. There aren't any commands and arguments as such because I wanted to keep the cells as flexible as possible. The time units defaults do milliseconds. There is no plan atm to make this configurable as I don't think there is a need for that. Even with the AFE version the samplerate is only selectable from a few predefined values.

krameler commented 4 years ago

There aren't any commands and arguments as such because I wanted to keep the cells as flexible as possible.

I would already call "cal" a command and the value "1234.9876" its argument. I dont know what type of command youre speaking of which would make the cells less flexible. But that's a question outside the scope of this comment thread.

The time units defaults do milliseconds. There is no plan atm to make this configurable as I don't think there is a need for that.

Ok, so my python code will expect the default and when needed converts user input into ms.

Even with the AFE version the samplerate is only selectable from a few predefined values.

Then those values would be an important information to be added into the wiki for the affected command. Just as everything else you told me in here so far would. :)