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?