Scripting
- Drag Drop
- Control Logic
- Custom UI
- Reporting
- Hardware
- Scripting
- Motion Paths
Sample
The following defines a generic script in a sequence...
EventSrc = Print "Task"
EventLog = ::IPWindowCollection#1.EventsView
//[EventLogStep] Eventlog = EventLog, \
// Severity = 0, Source = EventSrc, Description = Command
if(Command == "IOon")
{
print "Turn On " SubCommand
IOs = ::DigitalIOCollection
IO = [GCCollectionItem] Collection = IOs, IndexOrName = SubCommand::Item
IOValid = [GCCollectionItem] Collection = IOs, IndexOrName = SubCommand::ItemIndex
if(IOValid > 0)
{
[DigitalSetStep] IO = IO, State = 1
}
}
if(Command == "IOoff")
{
print "Turn Off " SubCommand
IOs = ::DigitalIOCollection
IO = [GCCollectionItem] Collection = IOs, IndexOrName = SubCommand::Item
IOValid = [GCCollectionItem] Collection = IOs, IndexOrName = SubCommand::ItemIndex
if(IOValid > 0)
{
[DigitalSetStep] IO = IO, State = 0
}
}
if(Command == "IOWaitOff")
{
print Command + " " SubCommand
IOs = ::DigitalIOCollection
IO = [GCCollectionItem] Collection = IOs, IndexOrName = SubCommand::Item
IOValid = [GCCollectionItem] Collection = IOs, IndexOrName = SubCommand::ItemIndex
if(IOValid > 0)
{
[DigitalWaitStep] IO = IO, WaitFor = 0, TimeOut = 60000
}
}
if(Command == "Run")
{
print "Run " SubCommand
Prgs = ::Programs
Prg = [GCCollectionItem] Collection = Prgs, IndexOrName = SubCommand::Item
PrgValid = [GCCollectionItem] Collection = Prgs, IndexOrName = SubCommand::ItemIndex
if(PrgValid > 0)
{
[GCExeStep] Step = Prg
}
}

