EventTableTriggerIO and EventTableActionIO do not work for Smart Component IO
in RobotStudio
Hi,
I tried to use EventTableTriggerIO and EventTableActionIO for IOs of a smart component in a code behind way. However, they do not work if I set 'controller' property to the smart component.
It works if the trigger and action signals are set to be station signals, but not for smart component signals.
Is there anything wrong in my coding? Or is it a bug?
I tried to use EventTableTriggerIO and EventTableActionIO for IOs of a smart component in a code behind way. However, they do not work if I set 'controller' property to the smart component.
public void AddEventTable(SmartComponent component)
{
Project.UndoContext.BeginUndoStep("EventTable");
try
{
//define event table trigger IO
EventTableTriggerIO etTriggerDi1 = new EventTableTriggerIO();
etTriggerDi1.Controller = component;
etTriggerDi1.Name = "di1";
etTriggerDi1.Value = 1;
//define event table action IO
EventTableActionIO etActionDo1 = new EventTableActionIO();
etActionDo1.Controller = component;
etActionDo1.Name = "do1";
etActionDo1.Value = 1;
//define event table entry
EventTableEntry etEntryDly = new EventTableEntry();
etEntryDly.EventTableTrigger = etTriggerDi1;
etEntryDly.EventTableActions.Add(etActionDo1);
etEntryDly.EventActivationMode = EventActivationMode.Simulation;
EventTableEntryCollection etec = Simulator.ActiveConfiguration.EventTable.EventTableEntries;
etec.Add(etEntryDly);
}
catch
{
Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
throw;
}
finally
{
Project.UndoContext.EndUndoStep();
}
}
It works if the trigger and action signals are set to be station signals, but not for smart component signals.
Is there anything wrong in my coding? Or is it a bug?
0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings