RobotStudio event

Casting Signal to GroupSignal - PCSDK

Has anyone tried working with group signals from PC SDK for 5.07?

According to documentation, it is necessary to cast a signal to its particular type (DigitalSignal, AnalogSignal, GroupSignal) before reading or writing to the signal.  When I attempt to cast to GroupSignal, it fails and says it is not possible.  It only lets me cast to DigitalSignal. 



DigitalSignal giMyGroup = (DigitalSignal)ioSystem.GetSignal("giMyGroup");
MessageBox.Show( giMyGroup.Value.ToString() );
giMyGroup.Dispose();
If I cast my group signal to a DigitalSignal, it allows me to access the value, and the value is correct.  But if I try to write to the value when it is cast to a DigitalSignal, I get huge numbers written to the group signal in the controller.

DigitalSignal giMyGroup = (DigitalSignal)ioSystem.GetSignal("giMyGroup");
giMyGroup.Value =
1;
giMyGroup.Dispose();
Has anyone else seen these problems when working with group signals?
 
Bryan Johnson
bryan.johnson@wolfrobotics.com
Wolf Robotics
4600 Innovation Dr.
Fort Collins, CO 80525
USA

Comments

  • This was a bug in the initial 5.07 release.  The next release will correct this problem.  I tested a beta version recently and everything worked correctly.
    Bryan Johnson
    bryan.johnson@wolfrobotics.com
    Wolf Robotics
    4600 Innovation Dr.
    Fort Collins, CO 80525
    USA