Re: [Gambas-user] gambase and modbus

2009-10-03 Thread Doriano Blengino
Jean-Yves F. Barbier ha scritto:
 Werner a écrit :
 ...
   
 Depends on what you use it for, it's not free for commercial purposes.

 You have propably seen
 http://copyleft.free.fr/wordpress/index.php/libmodbus/
 

 Thanks Werner, this look interesting.

 But AFAIK, GPLv3  LGPLv3 don't forbid commercial use as far as you provide
 a meaning to get all sources to the client (for short, it's better to supply
 compiled AND source:) and retain the copyleft and credits to original 
 creators.

 JY
   
I wrote in C, some time ago, an embedded application using modbus on RS-422.
It is not a difficult matter, at least the part I was interested in - my 
device acted as a server, and a MMI (a touch screen LCD panel) was 
attached to it.
If you are interested in, I can send some C source code and perhaps the 
official documentation I used to write it (available for free in the 
Internet). I don't remember if my implementation was full or had only 
the relevant part, but it was simple and short enough to be translated 
easily to gambas; there was only the CRC-32 (or whatever checksum) which 
was a little CPU intensive, but I suppose an i386 computer has far more 
power than a poor embedded microcontroller...
Unfortunately this material is in the computers at work, I have not it 
here at home, but the next monday I can fetch them.

Regards,

-- 
Doriano Blengino

Listen twice before you speak.
This is why we have two ears, but only one mouth.


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gambase and modbus

2009-10-03 Thread Jean-Yves F. Barbier
Doriano Blengino a écrit :
...
 I wrote in C, some time ago, an embedded application using modbus on RS-422.
 It is not a difficult matter, at least the part I was interested in - my 
 device acted as a server, and a MMI (a touch screen LCD panel) was 
 attached to it.

Oops, my fault, I forgot to tell precisions:
* It is in fact ModBus TCP,
* I'll use it for a HA cluster that'll retrieve info from some concentrators
  (900 sensors dispatched on 4 concentrators)

 If you are interested in, I can send some C source code and perhaps the 
 official documentation I used to write it (available for free in the 
 Internet). I don't remember if my implementation was full or had only 
 the relevant part, but it was simple and short enough to be translated 
 easily to gambas; there was only the CRC-32 (or whatever checksum) which 
 was a little CPU intensive, but I suppose an i386 computer has far more 
 power than a poor embedded microcontroller...

Thanks Doriano, but I think I've found what I need: 
I already retrieve docs from modbus.org, and find OpenSCADA (written in C++)
that seems to be ok to do the trick.
I only need to make some tests, and asked the hardware installer to try to
get a simulator from his supplier.

JY
-- 
You will think of something funnier than this to add to the fortunes.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Coordinates X and Y en DrawingArea controls

2009-10-03 Thread craf

Hello. 

VisualBasic Picturebox control has a MouseMove event which has 2
arguments (x as integer, and as integer). 
This lets me know the X and Y coordinates when the mouse moves over it. 
Is there something similar in Gambas?

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Coordinates X and Y en DrawingArea controls

2009-10-03 Thread Werner
craf wrote:
 Hello. 

 VisualBasic Picturebox control has a MouseMove event which has 2
 arguments (x as integer, and as integer). 
 This lets me know the X and Y coordinates when the mouse moves over it. 
 Is there something similar in Gambas?

 --
In Gambas2 apparently a DrawingArea can do that (with Tracking property
set) but a PictureBox can't.

Regards
Werner


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Arithmetic failure in project..Solution

2009-10-03 Thread Horst Günther Burkhardt III
On Fri, 2009-10-02 at 23:11 -0500, nando wrote:
 Friend,
 I have gone through your project and I ran it with these changes:
 
 (1) in SUB action_click...insert above this line:
 result = (exposure * (guidenumber / distance) * (flashcompensation) * 
 (multicompensation))
 
 these four lines:
 
 IF gn_feet.Value = TRUE THEN guidenumber = (input_gn.Value / 3.3)
 IF gn_metres.Value = TRUE THEN guidenumber = input_gn.Value
 distance = input_distance.Value
 if distance = 0 then distance = 0.1  'to prevent divide by zero error
 result = (exposure * (guidenumber / distance) * (flashcompensation) * 
 (multicompensation))
 
 (2)
 Remove or REM the 3 line sub:
 PUBLIC SUB input_distance_KeyPress()
 distance = (input_distance.Value)
 END

Hello there :)

Yes, that solves the basic calculation problem.

I'm still having an issue with CASE input_power.Selection ... it just
doesn't work, expects an object instead of a string or some such...

Thanks very much! 

-- Horst.


signature.asc
Description: This is a digitally signed message part
--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user