Operations Schedule

Sepasoft MES Module Suite

Operations Schedule

When an operation is scheduled, this object is created which holds information regarding the requested operation(s) and required production count or duration. If the operation(s) were scheduled against a work order, a reference to the work order is added to the Operations Request object. A category property allows you to prioritize or hold schedule events by setting the category to, as an example, 'Hold' or 'PRIORITY 10' or any custom category you choose. This object is derived from the MESAbstractObject and inherits all the exposed properties, methods and events for that object.

This object is created when an operation is scheduled using the MES Schedule View component. It may also be created using the following script functions:


Use

The following script functions use or return this type of object.


Object Properties

These properties are accessible through the MES Schedule View component and with the provided object functions, but not directly as obj.properties. Property values can be accessed and changed for an object by using the getPropertyValue() and setPropertyValue() method.

Name
Scripting
R/W
Description
Schedule Publish Date SchedulePublishDate Read/Write The date and time at which schedule was published. This setting is set when the operation is started, and it will be automatically set to the date and time of the Ignition server.
Schedule Type ScheduleType Read/Write This can be set to Held or Active.
Schedule Category ScheduleCategory Read/Write The category of the operations schedule object. Active and Actual schedule categories are reserved for currently active and completed respectively. Custom categories are acceptable.
Schedule Production Count ScheduleProductionCount Read/Write The production count for each schedule.
Schedule Duration ScheduleDurationSec Read/Write This is the duration of the schedule in seconds.


This object inherits the AbstractMESObject properties.


Object Functions


Python
# when updating an Operations Schedule you must load the schedule and save it with saveSchedule
# this way all associated objects are properly notified that a schedule change has been made
    schedItemList = system.mes.loadSchedule(schedUUID)
    for item in schedItemList:
        if item.getMESObjectTypeName() == 'OperationsSchedule':
            item.setScheduleProductionCount(schedQTY)
    system.mes.saveSchedule(schedItemList) # save the updated schedule items
 
## Do not load the operations schedule by itself to update the schedule object
#   schedObj = system.mes.loadMESObject(schedUUID)
#   schedObj.setScheduleProductionCount(schedQTY)
#   system.mes.saveMESObject(schedObj)
 

getScheduleCategory()

Description

Returns the category of an operations schedule object.

Syntax

getScheduleCategory()


  • Parameters

None

  • Returns

String scheduleCategory - The category of the operations schedule object.

  • Scope

All

Example
Code Snippet
Python
uuid = '634fac92-712f-4da0-b981-77d7c592ea2d'
obj=system.mes.loadMESObject(uuid)
type=obj.getScheduleType()
category=obj.getScheduleCategory()
print type, category

Output
Production Active
 

getScheduleDurationSec()

Description

Gets the duration of the schedule in seconds.

Syntax

getScheduleDurationSec()

  • Parameters

None

  • Returns

Integer scheduleDuration - The duration of schedule in seconds.

  • Scope

All

 getScheduleProductionCount()

Description

Returns the production count for this schedule.

Syntax

getScheduleProductionCount()

  • Parameters

None

  • Returns

Double productionCount - The production count for this schedule.

  • Scope

All

 

getSchedulePublishDate()

Description

Returns date and time at which schedule was published. This setting is set when the operation is started, and it will be automatically set to the date and time of the Ignition server.

Syntax

getSchedulePublishDate()

  • Parameters

None

  • Returns

Date - The date and time the schedule was published.

  • Scope

All

 getScheduleType()

Description

Gets the schedule type.

Syntax

getScheduleType()

  • Parameters

None

  • Returns

String type - The type of this schedule.

  • Scope

All

 

setScheduleCategory(scheduleCategory)

Description

Sets the category of an operations schedule object. Active and Actual schedule categories are reserved for currently active and completed respectively. Custom categories are acceptable.

Syntax

setScheduleCategory(scheduleCategory)

  • Parameters

String scheduleCategory - The category of the operations schedule object.

  • Returns

Nothing

  • Scope

All

 setScheduleDurationSec(scheduleDuration)

Description

Sets the duration of the schedule in seconds.

Syntax

setScheduleDurationSec(scheduleDuration)

  • Parameters

Integer scheduleDuration - The duration in seconds to set for.

  • Returns

Nothing

  • Scope

All

 

setScheduleProductionCount(productionCount)

Description

Sets the production count for this schedule.

Syntax

setScheduleProductionCount(productionCount)

  • Parameters

Double productionCount - The production count to set for this schedule.

  • Returns

Nothing

  • Scope

All

 

setSchedulePublishDate(schedulePublishDate)

Description

Sets date and time at which schedule was published. This setting is set when the operation is started, and it will be automatically set to the date and time of the Ignition server.

Syntax

setSchedulePublishDate(schedulePublishDate)

  • Parameters

Date schedulePublishDate - The date to set for.

  • Returns

Nothing

  • Scope

All

 

setScheduleType(scheduleType)

Description

Sets the schedule type. Any custom types like 'Production' and 'Maintenance'.

Syntax

setScheduleType(scheduleType)

  • Parameters

String scheduleType - The type to set for.

  • Returns

Nothing

  • Scope

All


This object inherits the AbstractMESObject functions.



Object Events

Objects have events associated with them that allow for custom scripts to be added whenever the event occurs.

Event Name
Description
 BeginSchedule

The event is fired when an Operations Schedule has begun.

If no script is entered, then the default handler will be executed. To execute the default handler from within the script entered here, add a script line:

event.runDefaultHandler()     

EndSchedule

The event is fired when an Operations Schedule has ended.

If no script is entered, then the default handler will be executed. To execute the default handler from within the script entered here, add a script line:

event.runDefaultHandler()     

New

The event is fired when a new instance of an Operations Schedule object is created.

If no script is entered, then the default handler will be executed. To execute the default handler from within the script entered here, add a script line:

event.runDefaultHandler()     

UpdateProgress

The event is fired during the update progress of an Operations Schedule.

If no script is entered, then the default handler will be executed. To execute the default handler from within the script entered here, add a script line:

event.runDefaultHandler()     

Sepasoft MES Module Suite