| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 06/04/2010 14:30:47
|
mmn666
Initiate
Joined: 22/03/2010 10:51:38
Messages: 15
Offline
|
Hi,
i try set a coil value in my I/O device but the time of the value is set, is much short. How i can set the value of a device for more time(or permanent)?
sorry my ignorance...
and thanks for your patience
regards,
Mario
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 06/04/2010 23:54:47
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1456
Offline
|
The value that is set should stay unless the device is changing it back for some reason.
|
Best regards,
Matthew Lohbihler |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 21/06/2010 15:33:55
|
mmn666
Initiate
Joined: 22/03/2010 10:51:38
Messages: 15
Offline
|
Hi Lohbihler,
I need to know how can I set a coil value in my I/O device for 5 seconds?
I try to use the point link, using the same point as source point and target point, but my code is not validated
my code:
TIMESTAMP = new Date().getTime();
x=0;
x.end(5000);
return source.value;
thanks for your patience
regards,
Mario
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 21/06/2010 16:06:48
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
Joined: 01/03/2007 22:48:52
Messages: 1456
Offline
|
No, that's not going to work. Here's what to do, assuming that you want to set the coil to "true" for 5 seconds.
1) Create a point event detector on the point that fires when the point has been "true" for 5 seconds.
2) Create an event handler for the event in 1) that sets the point to false when it activates, and does nothing when it deactivates.
|
Best regards,
Matthew Lohbihler |
|
|
 |
|
|