ulfsri / pyOMRON

Python API for acquisition and control of OMRON G3PW Power Controller
https://ulfsri.github.io/pyOMRON/
MIT License
0 stars 0 forks source link

Convert to useful quantities #82

Closed GraysonBellamy closed 6 months ago

GraysonBellamy commented 6 months ago

🚀 Feature Request

Need to provide more user friendly response to getting values. Right now it just returns the raw value returned by the device. This should either be converted to a float if it's numeric (and scaled if appropriate) or convert to a meaningful descriptive value. For example, getting 'Control Method Default' return is '1' or '0' which should be converted to 'Phase Control' or 'Optimum Cycle Control'

🔈 Motivation

User friendly and explanatory returns. Don't have to go to the manual to figure out what stuff means.

🛰 Alternatives

📎 Additional context

image

GraysonBellamy commented 6 months ago

Could have a dictionary or something that links an address to what conversions need to be done to variable. If this, probably want to integrate into the dictionary we already have since it has all the addresses linked to variable names.

GraysonBellamy commented 6 months ago

Added "status_labels" to the .JSON file. Now when running get() the response code will be translated into user friendly notation before being added to the dictionary.