Get machine state

Post questions and issues with Concept2 PM3 SDK
Post Reply
Anigif
Paddler
Posts: 11
Joined: December 24th, 2009, 9:32 pm
Location: Lemvig, Denmark

Get machine state

Post by Anigif » October 22nd, 2011, 12:49 pm

Hey everybody!

I'm trying to work on an applikation for the PM3/4 and got into a problem.. Chris Brett mentioned it here, but now I make a new topic because the other was kinda off topic ;)

I want to get the current state/status of the machine and try to use CSAFE_GETSTATUS_CMD via tkcmdsetCSAFE_command(), but nothing happens (and the respons-size is 0!) when trying to do it in the Demo nothing happens either, but when I do the same via tkcmdsetDDI_do_command() it works. However it would be nice to avoid using that function ("NOTE: This is not typically called by the application directly. For example, use tkcmdsetCSAFE_command () instead.").

Is it me doing something wrong or is it the SDK that's something wrong with..

Or.. I could maybe ask in another way.. Do I even need the state?
I could probably just "force" the machine to go into "finished" no matter what.. Imagine that the rowing-machine is using "just row" I think it wouldn't be a problem (going from "in use" to "finished" seems to be okay), but what happens if I'm in "finished" state already? Or in some of the others states that doesn't "link" directly to "finished" in the flowchart.
Would it "crash" the system or just be a "bad way of programming"?

Hope you can help me out here! :)

Thanks in advance from Denmark
Anders

Post Reply