Pulse Stretcher
Description
This object is being used to create ‘Pulse Stretcher' in an app. When triggered the 'Pulse Stretcher’ keeps the digital message high (1, true) for the defined amount of time before turning the digital message back to low (0, false).
The objects will now stop running once input parameters are changed.
App Builder Object
Source Code
function execute() {
if (trigger === 0) {
sleep(inPorts[1].value || 1000, false);
return [true];
}
if (trigger === TRIGGERS.SYSTEM_ASYNC) {
return [false];
}
return [];
}
In Ports
Position | Name | Message Type | Description |
---|---|---|---|
1 | In | Trigger | This port is being used to trigger the 'Pulse Stretcher’ object. |
2 | Time (ms) | Number | This port is being used to define the time in milliseconds that the 'Pulse Stretcher' object should stretch. |
Out Ports
Position | Name | Message Type | Description |
---|---|---|---|
1 | Out | Digital | This port is being used to send out the digital messages of the 'Pulse Stretcher' object. |
Properties
Name | Description |
---|---|
Object Name | The name of the object on the canvas. |
Show Code View | The switch to turn on code view for the Code Object. |
Duplicate code into custom Code Object |