Calling a programme from another programme.
Archiver
Posts: 46,084
Hi.
I need to have a 'main' programme which is constantly running - it is
constantly checking for a command from Visual Basic which will tell
certain parts of it to run. However I need also to have another
programme, 'rainfall' constantly running which is constantly tracking
the rainfall. When the 'main' programme gets a signal from VB, I need
to be able to retrieve a value (a word) from 'rainfall'. Please can
anyone give me some advice:
a) Is it possible to have two programmes running simultaneously
b) How can I retreive a value from one programme ('rainfall') to my
main programme, thank-you so much for any advice.
I need to have a 'main' programme which is constantly running - it is
constantly checking for a command from Visual Basic which will tell
certain parts of it to run. However I need also to have another
programme, 'rainfall' constantly running which is constantly tracking
the rainfall. When the 'main' programme gets a signal from VB, I need
to be able to retrieve a value (a word) from 'rainfall'. Please can
anyone give me some advice:
a) Is it possible to have two programmes running simultaneously
b) How can I retreive a value from one programme ('rainfall') to my
main programme, thank-you so much for any advice.
Comments
>
>I need to have a 'main' programme which is constantly running - it is
>constantly checking for a command from Visual Basic which will tell
>certain parts of it to run. However I need also to have another
>programme, 'rainfall' constantly running which is constantly tracking
>the rainfall. When the 'main' programme gets a signal from VB, I need
>to be able to retrieve a value (a word) from 'rainfall'. Please can
>anyone give me some advice:
>a) Is it possible to have two programmes running simultaneously
No, the Stamp is single-minded, one thing at at time.
>b) How can I retreive a value from one programme ('rainfall') to my
>main programme, thank-you so much for any advice.
The rainfall counter can have a little bit of memory of its own, so
you only have to check it once per second or so. Here is one way to
do that:
http://www.emesystems.com/OWL2rain.htm
For the communications side, the best reliability would be had by
using a hardware flow control. Or by use of a serial buffer chip.
Or have the Stamp send asynchronously and take advantage of the deep
serial buffer on the VB side. The Stamp's serial IO is not buffered.
-- Tracy