 |
plc.myforum.ro PLCs users www.plc.myforum.ro!
|
| View previous topic :: View next topic |
| Author |
Message |
sachincool786 Junior 2

Joined: 21 Jun 2015 Posts: 28
|
Posted: 13/12/2015 19:15 Post subject: Recipe function : factory talk view 8 |
|
|
Could anyone please tell me how can i make my recipe function working having :
1. SQL database linkage
2. VBA programme
3. Without making new recipe tags (want to use actual plc tags only, no new recipe tags)
I don't want to use the pre-configured recipe manager.
I want to develop my own.
None of the pre-configured components are worth a dang.
It would be highly appreciable.
Thank You. |
|
| Back to top |
|
 |
titi Member junior

Joined: 13 Dec 2015 Posts: 96
|
Posted: 13/12/2015 20:31 Post subject: Re: Recipe function : factory talk view 8 |
|
|
| sachincool786 wrote: | Could anyone please tell me how can i make my recipe function working having :
1. SQL database linkage
2. VBA programme
3. Without making new recipe tags (want to use actual plc tags only, no new recipe tags)
I don't want to use the pre-configured recipe manager.
I want to develop my own.
None of the pre-configured components are worth a dang.
It would be highly appreciable.
Thank You. |
Yhis is an example on WinCC Flexible from Siemens.
Maybe help you
| Code: | Sub NextRecord (Recipe)
Dim i, startTime, endTime
On Error Resume Next
i=HmiRuntime.SmartTags("Service\Recipes\curRecordNumber")
If i<HmiRuntime.SmartTags("Service\Recipes\maxRecordNumber") Then i=i+1
LoadDataRecord Recipe, i, HmiRuntime.SmartTags("Service\Recipes\rwDBresult")
startTime=Timer
Do
endTime=Timer
If endTime-startTime<0>=5 Or HmiRuntime.SmartTags("Service\Recipes\rwDBresult")=4)
If HmiRuntime.SmartTags("Service\Recipes\rwDBresult")<4> 3 Then 'remark 4 = done, 12 = error
ReceptReturnValue = 0
If InitRecipesTag = 5 Then
InitRecipesTag = 6
Call GetDataRecordTagsFromPLC("Circuit5Recipe","ReceptReturnValue")
End If
If SmartTags("InitRecipesTag") = 4 Then
InitRecipesTag = 5
Call GetDataRecordTagsFromPLC("Circuit4Recipe","ReceptReturnValue")
End If
If InitRecipesTag = 3 Then
InitRecipesTag = 4
Call GetDataRecordTagsFromPLC("Circuit3Recipe","ReceptReturnValue")
End If
If InitRecipesTag = 2 Then
InitRecipesTag = 3
Call GetDataRecordTagsFromPLC("Circuit2Recipe","ReceptReturnValue")
End If
If InitRecipesTag = 1 Then
InitRecipesTag = 2
Call GetDataRecordTagsFromPLC("Circuit1Recipe","ReceptReturnValue")
End If
End If |
|
|
| Back to top |
|
 |
sachincool786 Junior 2

Joined: 21 Jun 2015 Posts: 28
|
Posted: 14/12/2015 04:55 Post subject: Thank You. |
|
|
Thank You titi!!!
I dont think it'll work on FT View SE |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro
|