Simple Arduino Webserver for sucking Classic readings.

Started by phonetic, July 26, 2013, 09:45:22 PM

Previous topic - Next topic

atop8918

I've had really good luck with cygwin when doing compiles for Windows. It's a nice way to get your POSIX/*NIX-compatible code running on *doze. It's not perfect and I haven't tried doing any UI stuff since wxWidgets verion 1995 or so, but by and large for small generic programs it works a treat!


Graham

Quote from: mtdoc on July 29, 2013, 12:42:39 AM
Quote from: boB on July 28, 2013, 07:42:26 PM

I installed the modbus master on my windows 7 laptop but it has an error.  Some kind of memory
bounds error.  I also tried compatibility mode but no go.

Anybody else have a problem with win 7 and Ross's app ?

boB

Yep. Screen shot of error below:

Are you getting this error when you initially launch the app or does the window display?
Are you trying the Master or the Slave app?

Looking at the code it appears it's failing to allocate a chunk of memory for the modbus data.

I dug out an old XP laptop with 1 gig of ram and installed and ran both the master and slave app without any problems
I also tried it on a vista 32 bit- 4 gig and my windows 7 64 bit 4 gig laptop.

I posted an update to codeplex that checks the memory allocation at startup

If someone has time to try it since I can't reproduce the error here, could you let me know if you get the error "Failed to allocate 64k block" at startup or does the form display (see attached)

Install instructions;
-make sure you un-install any previous version
-download the ModbusTool.zip from the download area of modbustool.codeplex.com
-unzip the file
-run the setup.exe file in the "Modbus Master" folder
-you should be able to use the default install settings
-you may be asked to enter your password to allow it to proceed
- you should now have a blue cube icon (Modbus Master) under start->All Programs

thanks for your help

Graham.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

Graham

BTW
I changed my display name from rossgr to Graham to avoid confusion with RossW.

I'm the microsoft guy with a couple of open source projects on codeplex

netduinoSolar.codeplex.com: A solar equipment monitor that runs on a netduino
modbustool.codeplex.com: A modbus master and slave tool that (should) run on windows.

RossW is the linux guy...
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

mtdoc

I installed the Master  on my Win 7 laptop 64bit, 4 gig.

Error comes up on initial opening. If I then click continue the app opens up but that error comes up again if I try to do anything.

I have an XP machine at home I can try it on later.



Array 1: Sanyo HIT225 X 8 on Wattsun tracker. Array 2: Evergreen ES-E-225 X 12 on shed roof. Midnite e-panel with Outback GVFX3648, FNDC and Classic 150 X 2. 436 AH AGMs. Honda eu2000i X 2.

Graham

Quote from: mtdoc on July 29, 2013, 02:08:53 PM
I installed the Master  on my Win 7 laptop 64bit, 4 gig.

Error comes up on initial opening. If I then click continue the app opens up but that error comes up again if I try to do anything.

I have an XP machine at home I can try it on later.

I might have found the problem, the code is wrongly expecting at least one serial port for the RTU mode, when it doesn't find any it prematurely exits the initialization routine and never allocates the memory for modbus. All the machines I tried this morning have a serial port. I just tried it on another laptop that has no serial ports, the prior version did display an error at startup, the latest upload worked.

I've posted an update on codeplex.


thanks for your help

Graham.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

RossW

Quote from: Graham on July 29, 2013, 01:12:04 PM
BTW
I changed my display name from rossgr to Graham to avoid confusion with RossW.

Sorry, that was entirely my fault for reading a new post without looking back at the context.


Quote
RossW is the linux guy...

Not really. FreeBSD is my weapon of choice, but linux is "unix-like" in enough ways for many things to carry over.
3600W on 6 tracking arrays.
7200W on 2 fixed array.
Midnite Classic 150
Outback Flexmax FM80
16 x LiFePO4 600AH cells
16 x LiFePO4 300AH cells
Selectronics SP-PRO 481 5kW inverter
Fronius 6kW AC coupled inverter
Home-brew 4-cyl propane powered 14kVa genset
2kW wind turbine

mtdoc

Quote from: Graham on July 29, 2013, 03:27:06 PM
Quote from: mtdoc on July 29, 2013, 02:08:53 PM
I installed the Master  on my Win 7 laptop 64bit, 4 gig.

Error comes up on initial opening. If I then click continue the app opens up but that error comes up again if I try to do anything.

I have an XP machine at home I can try it on later.

I might have found the problem, the code is wrongly expecting at least one serial port for the RTU mode, when it doesn't find any it prematurely exits the initialization routine and never allocates the memory for modbus. All the machines I tried this morning have a serial port. I just tried it on another laptop that has no serial ports, the prior version did display an error at startup, the latest upload worked.

I've posted an update on codeplex.


thanks for your help

Graham.

That fixed it!  Thanks. Now i just need to find the time to learn more about modbus and play around with it ::)
Array 1: Sanyo HIT225 X 8 on Wattsun tracker. Array 2: Evergreen ES-E-225 X 12 on shed roof. Midnite e-panel with Outback GVFX3648, FNDC and Classic 150 X 2. 436 AH AGMs. Honda eu2000i X 2.

boB

Yep !  I seems to work good !  I like it !

Can you make it automatically update once every so many milliseconds ?  Once per second or so would
be nice but adjustable would be good too.

I'm not sure how you write a single register.  Which register writes ?

It also says "address"  I think you may mean "register" ?  Maybe you do mean address
though.

boB
K7IQ 🌛  He/She/Me