EventTableTriggerIO and EventTableActionIO do not work for Smart Component IO
Options
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.4K RobotStudio
- 384 UpFeed
- 14 Tutorials
- 12 RobotApps
- 291 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 247 ScreenMaker
- 2.7K Robot Controller
- 279 IRC5
- 46 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 734 RAPID Programming
- 15 Wizard Easy Programming
- 105 Collaborative Robots
- 3 Job listings