As you see I'm getting a fanspeed of 8.0V, and the lowest possible should be 8.5V. Similar situation with dischargeDelay...
Any ideas what could be ****ing up?
batchMassRegVal is an int variable, and switching it over to long changes nothing.
Sorry can't do that
Also the sketch is very long so I doubt you'd want to read the whole thing haha.
But what is some essential info that I could have missed providing?
/ Einar
Ok, here is a heavily trimmed version of the code where I try to capture just the modbus functionality. In reality I have 8 different threads running. The board is the portenta machine control:
It would have been very good if we have known this in the first place, and if you had posted in the correct section of the forum which is the portenta section. I suggest you move the there, use the big black pencil at the top of the first post to move it. Or I could do it for you if you want.
Well I deliberately did not post it there because that forum has a pretty low interaction level plus seeing portenta scares people off even if the problem may not be portenta specific...
Are you thinking that the result value is constrained between 850 and 1000? Well, it isn't..
No, and that would be fine if it was going outside the limit in a predictable fashion. But then you would expect the input to be outside the original high and original low range no?
Note: I solved the fanSpeedRoast problem, it was due to fanSpeedRoastCalc being an Int and not a Float so that when I divided it by 100 it just rounded the number down.
However look at the outputs for chargeDelay and dischargeDelay map functions... why are they throwing this weird number 8466 when they have the same input and different output ranges
Only because many members have no experience with that system and so they refrain from answering questions.
It seems we can't win.
If a member responds to something they would like to try on their own machine to trace your problem. Then finds out they haven't got that system to try it out with, then there is only a limited amount of help they can give. And then they get lambasted for not supplying useful help.
If a member responds to something they would like to try on their own machine to trace your problem. Then finds out they haven't got that system to try it out with, then there is only a limited amount of help they can give
That's fair. I was secretly hoping that it was a fundamental problem in my understanding of the function and something a veteran could easily spot and correct on the fly
As regards to lambasting, in my opinion the amount of that in this thread is appropriately low...