Events
Posted:
Fri 26. Apr 2024 7:45:13
by pavlos77
How can from one event to store multiple data to storage?
Re: Events
Posted:
Fri 26. Apr 2024 8:30:48
by admin
Could you please be more specific?
Re: Events
Posted:
Sat 27. Apr 2024 17:23:28
by pavlos77
Lets say that i am reading 5 values from a PLC and when one value of these changed i want to store 3 off them in a single row of a database.
For a example when a bool value changed to true store 5 values from a batch. (is this possible with events or i have to write code to do this?)
Re: Events
Posted:
Tue 30. Apr 2024 10:14:03
by Kazimierz Heczko
Hello,
To write some values to the database after change one variable is possible when you create data extension "WriteAction" for this variable, where you select "call after EVERY CHANGE of this item value" option for Event "onItemAfterWrite" configurator. Then you have to goto the Events tab in the PmaData object, where this value exists and write code, which should read required values and writes it into the database. For writing to the database you have to create PmaAdo object in application and connect this object to the required database and then call method DbExecute where you have to create SQL querym, that writes these values into the database.
So answer is, that you have to write code, which will be write required values into the database.