View Full Version : VARIABLE passing between machines
ddlawrence
09-04-07, 10:28 PM
Hi. Is it possible to pass a few bytes between machines?
I need to pass shaft position from an encoder machine to a DCmotor machine
on the same pod. Passing a variable or 2 would be nice.
No need to go into a long explanation, just point me to the right pdf.
thanks..........don
RMDumse
09-04-07, 11:00 PM
Sure, you can pass variables in variables. Very simple. One machines stores them. Another machine reads them.
Or you can get fancier and set up queues. Use one variable to say how many bytes in a buffer, and another one with additional space alloted, and enter the parameters to be passed in there.
Control between machines can be cooperative, where transitions can check another machine's status (in variables, or by checking its state with IS-STATE?).
Control can be forced in a master slave configuration by one machine forcing another machines state (with SET-STATE).
Think there is some documentation on interstate communications in the IsoMax(TM) manual.
ddlawrence
09-05-07, 04:16 PM
OK I read the isomax chapter on variables 3 times.
Are VARIABLEs global? If machine1 has a variable var3, and machine2 wants to
read the contents of var3, does machine2 need any sort of var3 declaration?
Are all the state definitions global?
btw, I am really making progress with this statemachine language.
It is quite different but it could be a beautiful thing. Good thing I grew up
with an HP reverse polish calculator!
thanks..........don
:o
RMDumse
09-05-07, 04:36 PM
Are VARIABLEs global?
Yes.
If machine1 has a variable var3, and machine2 wants to read the contents of var3, does machine2 need any sort of var3 declaration?
No.
Are all the state definitions global?
Yes.
Good thing I grew up with an HP reverse polish calculator!
Yes, that can be quite an advantage. But as with the calculator, once you master it, it becomes natural, and easy to think about.
ddlawrence
09-05-07, 04:46 PM
Hi. I just found my program works after all! I confirmed the variables and states are global.
A funny thing on my minipod, SCI0 Tx does not transmit when the REDLED is ON.
Is it tied to PA0 or something?
I noticed this in 2 separate machines and rechecked by using GRNLED instead.
I checked back and forth a couple of times to make sure I wasn't imagining things!
I'll ignore the problem for now, maybe it is me.
thanks.................don
RMDumse
09-05-07, 05:29 PM
Yes, as it turns out, the GPIO pins are rather limited on the 803, so some serve double duty. I think the REDLED also shares other functions on the MinPod(TM). Same thing is true with the PlugaPod. Limited resources so some sharing of functions.
Looking on the MinPod(TM) schematic, I see PE2 is the REDLED and also the RS-232 shutdown. PE3 is the GRNLED and also the CAN transmitter enable.
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.