Getting Session Data From Pm3

Post questions and issues with Concept2 PM3 SDK
[old] Hvanhovell

Post by [old] Hvanhovell » March 19th, 2005, 12:50 pm

Hi everyone,<br /><br />I was wondering if it is possible to some default session data from the PM3, like workout duration/distance and the resttime used. The workout duration can be calculated by adding the results of the CSAFE_GETWORK_CMD and the CSAFE_PM_GET_WORKTIME commands (workdistance can be calculated in a similar fashion), but these results sometimes differ a second from the actuall worktime and it is a rather cumbersome procedure.<br /><br />At present I really cannot find an easy way to get the selected resttime value. Doe anyone know a better way to obtain these values? any help would be greatly appreciated.<br /><br />Cheers Herman van Hovell.

[old] mlyons

Post by [old] mlyons » March 26th, 2005, 12:53 pm

Herman,<br /><br />I'm not quite sure what you're asking to read from the PM3. Are you interested in being able to get the "workout definition" from a pre-programmed workout, a workout that someone sets up, etc? Or are you asking about data that might be read from the PM3 while a workout is in progress? Concept2 is still adding features to the Public CSAFE protocol as they move out of Alpha into Beta testing leading to inclusion in production software. The Public CSAFE protocol is a "generic" exercise equipment control/monitoring protocol which is lacking support for many specific features of the rowing machine. We welcome suggestions/requests from users who intend to utililze the protocol. Please provide a detailed explanation of how you intend to use the protocol and we'll consider them.<br /><br />Thanks,<br /><br />Mark

[old] Hvanhovell

Post by [old] Hvanhovell » July 13th, 2005, 6:09 am

Sorry that I didn't get back to you sooner. What I really would like to get from the PM3 is the data set by the user prior to the workout. So for instance with a distance workout, I would like to get the total distance (CSAFE_PM_GETTOTALRESTTIME) that will be covered in the workout and the the total rest time the user has entered (CSAFE_PM_GETTOTALWORKDISTANCE???) (currently these values can only be approxmiated -which is a pain...). The same mechanism for timed, and variabele split would be nice. I believe such functions already exist in de private domain, so make them public? .<br /><br />cheers, Herman van Hovell

[old] mlyons

Post by [old] mlyons » July 13th, 2005, 3:14 pm

Herman,<br /><br />A new SDK release is available since March with updated documentation and some new features. On the subject of your specific question about reading the workout setup information from the PM3 when the workout is setup by the user, some of that information can be read now and I have added some additional PM3-specific commands for the next release.<br /><br />The work distance or time can be gotten from existing (GET_WORKDISTANCE, GET_WORKTIME) commands in the current SDK release. I have added GET_RESTTIME for the next release. You will also be able to read the current workout interval count and the interval type (i.e., time, distance, rest) for the currently active interval.<br /><br />Hope this helps.<br /><br />Mark

[old] kpd
Posts: 0
Joined: March 18th, 2006, 10:32 pm

Post by [old] kpd » February 28th, 2006, 8:38 am

Mark,<br /><br />Will we be able to read the 'target distance' and 'target time' for single distance/single time workouts?<br /><br />If there is a way to calculate 'meters/time' remaining, could someone post some hints?<br /><br /><br /><!--quoteo(post=30136:date=Jul 13 2005, 02:14 PM:name=mlyons)--><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><div class='genmed'><b>QUOTE(mlyons @ Jul 13 2005, 02:14 PM) </b></div></td></tr><tr><td class='quote'>Herman,<br /><br />A new SDK release is available since March with updated documentation and some new features. On the subject of your specific question about reading the workout setup information from the PM3 when the workout is setup by the user, some of that information can be read now and I have added some additional PM3-specific commands for the next release.<br /><br />The work distance or time can be gotten from existing (GET_WORKDISTANCE, GET_WORKTIME) commands in the current SDK release. I have added GET_RESTTIME for the next release. You will also be able to read the current workout interval count and the interval type (i.e., time, distance, rest) for the currently active interval.<br /><br />Hope this helps.<br /><br />Mark<br /> </td></tr></table><br />

[old] mlyons

Post by [old] mlyons » February 28th, 2006, 9:53 am

The PM3-specific commands GET_WORKOUTTYPE, GET_WORKTIME and GET_WORKDISTANCE should be sufficient to allow you to determine the distance/time for a user configured workout. The workout type will tell you whether the user configured workout is a JustRow, Fixed Distance Piece or Fixed Time Piece. See SDK documentation (Rev 0.10) Table 3 under PM3-specific commands for details. Once you know the type of workout, you can use the GET_WORKTIME for a Fixed Time Piece and the GET_WORKDISTANCE for the Fixed Distance Piece. As Table 3 indicates, these commands will return the distance/time seen on the display during the workout so that prior to commencing rowing they will return the piece duration.<br /><br />As the workout progresses the time and distance values returned by these commands will count down indicating the remaining meters/time left in the workout. Examples of how these commands are used also exist in the SDK documentation.<br /><br />Let me know if you have any more questions.<br /><br />Mark<br /><br />

[old] kpd
Posts: 0
Joined: March 18th, 2006, 10:32 pm

Post by [old] kpd » February 28th, 2006, 10:41 am

Thanks Mark. That makes sense. I hadn't thought of recording those values before the piece starts. <br /><br /><br /><!--quoteo(post=57640:date=Feb 28 2006, 08:53 AM:name=mlyons)--><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><div class='genmed'><b>QUOTE(mlyons @ Feb 28 2006, 08:53 AM) </b></div></td></tr><tr><td class='quote'>The PM3-specific commands GET_WORKOUTTYPE, GET_WORKTIME and GET_WORKDISTANCE should be sufficient to allow you to determine the distance/time for a user configured workout. The workout type will tell you whether the user configured workout is a JustRow, Fixed Distance Piece or Fixed Time Piece. See SDK documentation (Rev 0.10) Table 3 under PM3-specific commands for details. Once you know the type of workout, you can use the GET_WORKTIME for a Fixed Time Piece and the GET_WORKDISTANCE for the Fixed Distance Piece. As Table 3 indicates, these commands will return the distance/time seen on the display during the workout so that prior to commencing rowing they will return the piece duration.<br /><br />As the workout progresses the time and distance values returned by these commands will count down indicating the remaining meters/time left in the workout. Examples of how these commands are used also exist in the SDK documentation.<br /><br />Let me know if you have any more questions.<br /><br />Mark<br /> </td></tr></table><br />

[old] kpd
Posts: 0
Joined: March 18th, 2006, 10:32 pm

Post by [old] kpd » February 28th, 2006, 6:21 pm

Mark, thinking this through, it would be cleaner to read the goal distance/time directly. Is that something that would be possible for the March release? <br /><br /><br /><!--quoteo(post=57654:date=Feb 28 2006, 09:41 AM:name=kpd)--><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><div class='genmed'><b>QUOTE(kpd @ Feb 28 2006, 09:41 AM) </b></div></td></tr><tr><td class='quote'>Thanks Mark. That makes sense. I hadn't thought of recording those values before the piece starts. <br /><br /> </td></tr></table><br />

[old] mlyons

Post by [old] mlyons » February 28th, 2006, 6:44 pm

There are no Public Csafe commands defined to retrieve the "goal" distance or time. You are operating "outside the envelope" of Public Csafe which is intended to configure a workout and monitor its progress. In this case, you want to monitor the progress of a workout that has been manually configured by the user.<br /><br />Even if I opened up the complete proprietary command space of the PM3 I couldn't offer you an existing command that would provide "goal" information. I can't justify adding a special command at this point when the information is currently available although not as conveniently as you'd like.<br /><br />I'm open to persuasion if you'd like to try....<br /><br />Mark

[old] kpd
Posts: 0
Joined: March 18th, 2006, 10:32 pm

Post by [old] kpd » March 1st, 2006, 8:32 am

Ok, I'll bite. :)<br /><br />Since people are used to setting workouts through the PM3 interface, for usability reasons I see no reason to change that and force them to learn a second interface to configure workouts. Aside from usability, the API addition would make for a cleaner, more orthogonal API and cleaner code on the client side - and multiple people are asking for it! Not being on the CSAFE committee, I can't presume to know their intentions, but it does seem reasonable that monitoring a workout could include '% complete.' But I will/should/had better have the workaround implemented over the next couple of days.<br /><br />thanks,<br />Kevin

[old] haboustak

Post by [old] haboustak » March 1st, 2006, 10:34 am

Approaching the issue from a slightly different direction. Rather than focusing on the goal parameter of a workout, how about creating a PM3-specific command that returned the workout parameters (or even monitor workout label) for a specific pre-programmed workout ID?<br /><br />You have the following workout IDs defined:<br />Standard (0-4)<br />Custom (5-9)<br />Favorite (10-14)<br />(available via CSAFE_GETPROGRAM_CMD)<br /><br />We already know the workout type, goal distance/time, intervals, split duration, etc for the five standard workouts. How about devising some way to use this ID to query the workout parameters. This would not only solve the goal issue, but also the issue of presenting the user with a formatted list of available pre-programmed workouts on the PM3 (something more meaningful than 'Favorite #1').<br /><br />Mike<br /><br />P.S. I've been trying to think of things that might persuade you to tinker with the firmware other than convincing arguments. Wines and Cheeses perhaps?

[old] kpd
Posts: 0
Joined: March 18th, 2006, 10:32 pm

Post by [old] kpd » March 1st, 2006, 4:10 pm

That's a great idea - much more useful. I have been thinking that I would leave intervals unsupported for the first release, but something like that would probably let me support them.<br /><br /><!--quoteo(post=57834:date=Mar 1 2006, 09:34 AM:name=haboustak)--><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><div class='genmed'><b>QUOTE(haboustak @ Mar 1 2006, 09:34 AM) </b></div></td></tr><tr><td class='quote'>P.S. I've been trying to think of things that might persuade you to tinker with the firmware other than convincing arguments. Wines and Cheeses perhaps?<br /> </td></tr></table><br />I'll throw in a couple bottles of home brew.

[old] c2scott

Post by [old] c2scott » March 1st, 2006, 4:30 pm

Probably more than wine and cheese I'm thinking...<br /><br />I should note before I give grave consideration to these earth-shattering decisions, I should note that the CSAFE committee has their annual meeting in Las Vegas on Mar 21 (anyone going???). That'd be a good place to promote additions to the CSAFE protocol. In the mean time, it seems there is a good viable workaround...<br /><br />-- Scott

[old] mlyons

Post by [old] mlyons » March 1st, 2006, 4:33 pm

A single Csafe frame isn't large enough to handle the maximum # of intervals (30) in a variable interval workout. It's approximately 9 bytes + 6 bytes * (# of intervals - 1) allowing a single Csafe frame to only support up to 8 - 10 intervals safely.<br /><br />Given this situation, I'm not sure there is a clean way to handle variable intervals in this model.<br /><br />Mark

[old] kpd
Posts: 0
Joined: March 18th, 2006, 10:32 pm

Post by [old] kpd » March 2nd, 2006, 8:51 am

<!--quoteo(post=57937:date=Mar 1 2006, 03:33 PM:name=mlyons)--><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><div class='genmed'><b>QUOTE(mlyons @ Mar 1 2006, 03:33 PM) </b></div></td></tr><tr><td class='quote'>A single Csafe frame isn't large enough to handle the maximum # of intervals (30) in a variable interval workout. It's approximately 9 bytes + 6 bytes * (# of intervals - 1) allowing a single Csafe frame to only support up to 8 - 10 intervals safely.<br /><br />Given this situation, I'm not sure there is a clean way to handle variable intervals in this model.<br /><br />Mark<br /> </td></tr></table><br /><br /><br />It would be ok for us to query for the data one interval at a time. <br /><br />(Side note - congrats on the release of the Mac log-util software. Good to hear Mac support is coming. )

Post Reply