Page 1 of 3

Re: 18650 Conditioner unit.

Posted: Tue Apr 23, 2019 8:04 am
by Mike-AU
Sorry I posted this in the wrong forum before:---

Hi Philr

I am having a huge issue getting the tables to work as I need them to.

I have inputs from 20 sensors, each sensor is supplying 4 lines of information.

DT1.SendData("Bus Voltage", busvoltage,);
DT1.SendData("Shunt Voltage: ", shuntvoltage);
//DT1.SendData("Load Voltage: ", loadvoltage);
DT1.SendData("Current: ", current_mA);
DT1.SendData("Power: ", power_mW);

This information is collected in a loop , The program reads sensor 1 , outputs the information, then loops to sensor 2 and so on.
problem is , when I try to print to table all it does is over write the 4 lines because they have the same "Name" .
I have tried to add a string as a name to increment the names , but the code will not accept that option.

I really dont want to write 80 "sendata" lines of code to cover the 20x4 lies of info.

Am I missing something here to allow me to print to specific row in a table? Apart from being locked into a fixed "name"?

I need to be able to use a string variable in the "Name" section if that is at all possible.


Cheers for now... Mike.

Re: 18650 Conditioner unit.

Posted: Wed Apr 24, 2019 2:44 am
by philr
Hi Mike, I think the key to this one is being able to configure the strings dynamically. I'd probably look to use the PString library:

http://arduiniana.org/libraries/pstring/

You could use that to assemble custom strings for the table visualiser. The raw commands can be found here
https://www.megunolink.com/documentatio ... reference/

Hopefully this give you some inspiration. I can build a demo version at some point just extremely busy right now.

Good luck!
Phil

Re: 18650 Conditioner unit.

Posted: Thu Apr 25, 2019 12:34 am
by Mike-AU
Thanks for that Phil

Please dont think I am complaining, I definately am not!. Love the ML program.

I am pushing the bounds a bit by having such a large project.
I am trying to monitor 24 sensors, control 20 relays, display 100 lines plus of results and data. If we can manage to tweak ML to do this ,then you have a program that can run just about anything.

The question about the Names above most people would never come across. So by sorting this issue out, you will expand what your GUI can do for others in the future .

I shall go look at the 2 links you gave me.

Keep up the great work!.
Mike.

Re: 18650 Conditioner unit.

Posted: Fri Apr 26, 2019 2:27 am
by Mike-AU
OK I bit the bullet and built 20 seperate tables, now I notice my send data to a specific table is not working.

May I upload a copy of the code here so you may see what I have dont wrong?

Also is there a way of turning default table OFF in the code, so I dont have to edit 20 tables everytime I rest the board?

Mike.

Re: 18650 Conditioner unit.

Posted: Sun Apr 28, 2019 3:58 am
by Mike-AU
Is there a way of declaring 20 seperate tables?

is this done under on Table command with 20 channels or is it done with 20 seperate table variables.

Mike.

Re: 18650 Conditioner unit.

Posted: Sun Apr 28, 2019 6:39 am
by philr
Hi Mike, yeah you would need to separate them using channels. You would go:

Table MyTable1("Table1");
Table MyTable2("Table2");
Table MyTable3("Table3");

Then you would use each variable to send to that channel. At the megunolink end you would need to create all of the tables and make sure each one only accepts data from its specific channel.

Cheers
Phil

Re: 18650 Conditioner unit.

Posted: Sun Apr 28, 2019 11:22 am
by Mike-AU
Yup I figured that. Just for experimental experience, I wrote another sketch . The read and print loop blew out from 24 lines to just under 300 lines of code.
This includes 20 "Table cell1("bay1");" statements to create 20 channels to talk to 20 tables on.

Once i have inserted the data test section , the section that looks for low or high readings and stuff like that, I can see the sketch blowing out another 4 to 5 hundred lines
.
Although I may be able to do a jump to function and return with results. That way I only have to write it out once.


Also I have a minor issue with the designer.
Because i have so much going on on the screen, I lock everything once arranged where it need to be, but i found if you pack up for the night and save the work when
you re-open the file, everything is where you put it. however nothing is locked anymore. Is there anyway on the next update you can get the designer to save the locked/unlocked flag please?


Just a bit of feedback thats all.

Mike.

Re: 18650 Conditioner unit.

Posted: Mon Apr 29, 2019 12:10 am
by Mike-AU
New day and i got to upload the new sketch... all 20 channels work just fine.
20 relay controls work fine.
The Interface panel is working great and looking cool to with a metal tile background.

Now, Phil dear sir, is there a way to get these table to "remember" their channel settings?
If not every time I load the interface I have to manually go through all tables and do a manual reset and that is going to get tedious quickly.

Cheers for now.. Mike.
:)

Re: 18650 Conditioner unit.

Posted: Wed May 01, 2019 11:51 pm
by Mike-AU
Meguno's inability to accept variables as "Names" has severely diminished , the usability when dealing with a lot of data and visualizers.
Unfortunately this has led to four different panels having to be designed.
Each new panel having to be both simpler and "Dumber" than the previous one.

If you guys ever change the code to accept a name in either "name" or "$name" format you will VASTLY increase the usability of the sofTware.

I used to write MUD games back in the 80's and trust me without the ability to use $Names it would have been almost impossible to do.

Just for your information, a small glitch I have found, In Table when selecting No Channels , the include new channels check box does not clear.
Not a big issue, but thought you would like to know.

Thats it for now... I shall now try and see if I can get 20 Dynamic Text boxes to work as required, although I feel this will also end in failure due to restrictive name selection issues.

Have a great day...Mike.

Re: 18650 Conditioner unit.

Posted: Mon May 06, 2019 5:47 am
by philr
Ha we have never used the lock property and we're surprised it isn't saved. Will add to the bug list to be fixed. As for saving channels in tables that seems to be working for me. Did you get that going in the end?

I'm not 100% sure I understand your naming suggestion with the $. Could you elaborate a little bit further with a small example maybe?

Cheers
Phil