Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.

Led

dallas72
dallas72
edited February 2014 in Developer Tools
Hello RobotStudio friends. 

I'm new to c # so I need your help. 
I have two LEDs that I want to connect to two different digital inputs. 
I have tried many different variations of code but have not succeeded. 

See my code below. 

thanks in advance.

// 
// griperOpenRob1signalBindingSource
// 
this.griperOpenRob1signalBindingSource.DataSource = typeof(ABB.Robotics.DataBinding.SignalObjectCollection);
signalObject3.Name = "DI_Gripper_1_Open_R1";
signalObject4.Name = "DI_Gripper_1_Closed_R1";
this.griperOpenRob1signalBindingSource.Signals.Add(signalObject3);
this.griperOpenRob1signalBindingSource.Signals.Add(signalObject4);
// 
// led1
// 
this.led1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.led1.DataBindings.Add(new System.Windows.Forms.Binding("Value",this.griperOpenRob1signalBindingSource.GetListName(signalObject3), "Value", true, System.Windows.Forms.DataSourceUpdateMode.Never));
// 
// led2
// 
this.led2.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.led2.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.griperOpenRob1signalBindingSource.Signals.Add(signalObject4), "Value", true, System.Windows.Forms.DataSourceUpdateMode.Never));

Post edited by dallas72 on