You can use script table and add actions that you want to execute. Try to read the script table so you can get an understanding what to do. You can use activity calendar to invoke scripts of the script table when you want to.
Usually you are writing for the passive table and then you activate it.
So change index #5 (Active Day Profile Table) to index #10 (Passive Day Profile Table)
Then write it and read the activityCalandar attribute index #10 and check that the new data is there.
Then call activatePassiveCalendar to activate the day profile table.
activityCalandar.activatePassiveCalendar(self.client)
If you read the passive table it's not empty and your passive table has been moved to active table.
You have added a script to the day profile that doesn't exists. You need to select the script that you want to execute here. You get the list of all scripts when you add a new action.
Hi, You can use script table…
Hi,
You can use script table and add actions that you want to execute. Try to read the script table so you can get an understanding what to do. You can use activity calendar to invoke scripts of the script table when you want to.
BR,
Mikko
Hi Mikko, This is the code I…
Hi Mikko,
This is the code I written in python
writeTOD = datetime.now()
attributeIndex=5
dayProfileAction = GXDLMSDayProfileAction()
dayProfileAction.startTime = GXTime(writeTOD)
dayProfile = GXDLMSDayProfile()
dayProfile.dayId = writeTOD.day
dayProfile.daySchedules = []
dayProfile.daySchedules.insert(0,dayProfileAction)
activityCalendar = GXDLMSActivityCalendar('0.0.13.0.1.255')
activityCalendar.dayProfileTablePassive = []
activityCalendar.dayProfileTablePassive.insert(0,dayProfile)
self.write(activityCalendar, attributeIndex)
activityCalandar = GXDLMSActivityCalendar('0.0.13.0.0.255')
activityCalandar.time= GXDateTime(datetime.now())
self.write(activityCalandar,10)
Its working fine ,But how I check the TOU is updated in meter?
Is the code missing anything?
Hi, Usually you are writing…
Hi,
Usually you are writing for the passive table and then you activate it.
So change index #5 (Active Day Profile Table) to index #10 (Passive Day Profile Table)
Then write it and read the activityCalandar attribute index #10 and check that the new data is there.
Then call activatePassiveCalendar to activate the day profile table.
activityCalandar.activatePassiveCalendar(self.client)
If you read the passive table it's not empty and your passive table has been moved to active table.
BR,
Mikko
Its returning null value I…
Its returning null value
I read through GXDLMSDirector only time is showing script and selector is missing.With which script and selector I should update here?
Hi, You have added a script…
Hi,
You have added a script to the day profile that doesn't exists. You need to select the script that you want to execute here. You get the list of all scripts when you add a new action.
BR,
Mikko