Need help in SFC functional flow modification

I am working with "Recipe Management Exchange project" available in ignition exchange, I need to do modification in that project.
Let me explain the flow, It has two function, F1 and F2.
F1 function will flow from one step to next according to the time what we are given
F2 will work as, a pop up will come, I need to enter text and confirm so it will move to next step.
What I need is, I want F1 function to run for given time like 15 secs, when 15 secs ends, one pop up should come and in that I need to give "OK" to move on next stage.

custom.starttime= Time process started.
custom.endtime = Time in which each process ends.

What I have Tired,
I have tired to implement, change script in custom.endtime , but throws the error as "It should be in INT/STRING not in DATE".

if currentValue.value is not None:
			#open the step 7 popup if the chart is running.
			if self.custom.function==3 and self.custom.currentID is not None and self.custom.currentID!="":
				system.perspective.openPopup("F7Popup",'Exchange/SFC Recipe Handler/F7 Popup', params = {'name':stepdescipt,'step':step,'id':id},title="Function 7", showCloseIcon = True, resizable = True, draggable=True, modal=True)

Codes in SFC Startup for function-1:

	#check time in step that has been paused and what happens during a pause
	#add all "times" together",pause),p1),p2),p3)
#	system.perspective.openPopup("F7Popup","Exchange/SFC Recipe Handler/F7 Popup" , showCloseIcon = True, resizable = True, draggable=True, modal=True)
	#check if now is after added time
	if, endTime):
##		system.perspective.openPopup("F7Popup","Exchange/SFC Recipe Handler/F7 Popup" , showCloseIcon = True, resizable = True, draggable=True, modal=True)

Code in FUNCTION-2:

if chart.writeString is not None:
			system.tag.writeBlocking([tagPath], [chart.writeString])
		if val==chart.writeString:
		if chart.f7Message==False:

I know it was bit unclear and lengthy one. Ready to explain more clearly if need, Trying to achieve this for past one day,but not able to do. Kindly help me to achieve this.

The value of custom.endtime perspective property is of type Date. currentValue.value in the property change script refers to the value of the custom property. When you do call int() on a Date object it doesn't how how to convert the Date object to a integer.

I think what you wanted to do is reading the custom.step perspective property by self.custom.step

1 Like

Hey Bill.LIu. Thank you for your reply. Now Actually I can able to get the popup and modified the SFC flow as once popup is opened and clicking the Next button only moves to the next stage. Now Where I was struggling is, I need to open the popup only at the end of the each process. I have start time and end time of each process in custom method.
I need a help how can I achevie to open the popup whenever time reach the end time of process.
Process 1:
EndTime:10..00.12........So At 10.00.12 I want to open popup
Process 2:
Startime 10.00.12 At 100.00.24 I want to open up the popup.

I will have this values of starttime and endtime when process starts.
Starttime and endtime will populate data in custom method.
Kindly helpme on this.