Home › Forums › Mayfly Data Logger › Wingshield for Modbus Communication with Isco Signature › Reply To: Wingshield for Modbus Communication with Isco Signature
You should be able to copy that chunk of code and apply it to any variable you’re interested in. You can even grab multiple variables in the same query. In the example I typed up I grabbed all six registers for the date/time at once (with the getRegisters call) and then used the uint16FromFrame function to separate them into the component parts. You could just as easily grab the level value in the same call as the date and time or get the sec/min/hr/etc each in individual calls. It takes less time (the actually communication time between the Mayfly and the ISCO) to make one request for many registers than to make multiple calls for single registers, but the code might be easier (for a person) to follow if you request each result separately. The maximum number of registers you can get in a single call is 125.
You could hack the variables from the Signature into ModularSensors by calling them “calculated” variables where the “calculation” is actually to interrogate the Signature for current values. You’d have to make sure that “calculation” includes the code to power up your RS485 adapter if you’re powering it from the Mayfly because the calculations are all run after all normal sensors are finished and put to sleep.
If you want to really treat the Signature properly as a sensor, you should create a new sensor within ModularSensors. You might want to base it on either one of the Keller or Yosemitech sensors – they also use modbus. If you want to go that way, I can look it over and give some pointers and review, but I probably won’t be able to write it up for you anytime soon.