xbix
September 23, 2019, 2:26pm
1
I need to trigger a momentary button from python and I’m trying this from my chop exe:
Inside the onValueChange:
op(‘/settings’).par.Reset = true
or
op(‘/settings’).par.Reset = 1
Either seems to work. What would be the right syntax, please? And what is the chop version for this purpose?
Thanks!
malcolm
September 23, 2019, 5:56pm
2
the best syntax to press a button is:
op('/settings')par.Reset.pulse()
xbix
September 24, 2019, 9:25am
3
Thanks Malcom, but this is not working for me. Please see the attached example.
Trigger momentary test.toe (3.99 KB)
rob
September 24, 2019, 3:11pm
4
Hi.
There’s an issue with referencing parameters, that we’re working on.
You can work around it by stretching the pulse length a full frame:
op(‘/project1/container1’).par.Test.pulse(frames=1)
Thanks for the example,
Rob.
rob
September 24, 2019, 5:08pm
5
Actually, the issue is you’re using an expression in the constant CHOP to access the value.
The value changes twice on the same frame be default, so the constant CHOP will only hold the last value.
I think stretching the pulse to at least frames=1 is how to make sure the constant CHOP processes the on/off transition.
Cheers,
Rob.
xbix
September 25, 2019, 7:53am
6
Indeed, Rob, this is working now. Thanks a lot for the support!