ArrayArrayArrayArray BrainModular BrainModular Users Forum 2022-06-30T22:05:19+02:00 https://brainmodular.com/forums/app.php/feed/topic/7011 2022-06-30T22:05:19+02:00 2022-06-30T22:05:19+02:00 https://brainmodular.com/forums/viewtopic.php?t=7011&p=44162#p44162 <![CDATA[Re: How to trig in fastscript… ?]]>
Sorry for the delay: I did not recieve any alert... maybe a small bug in the forum...

Thanks anyway for your answers.
And yes of course, I understand now it has to be handled by the Process procedure!

Have a good day.

V

Statistics: Posted by Vincent — 30 Jun 2022, 22:05


]]>
2022-06-19T09:31:22+02:00 2022-06-19T09:31:22+02:00 https://brainmodular.com/forums/viewtopic.php?t=7011&p=44158#p44158 <![CDATA[Re: How to trig in fastscript… ?]]>

CODE:

// flagvar sendTrigger:boolean;Procedure Process;begin      if sendTrigger      then begin            TrigNext.asInteger(1);            sendTrigger := false;      end      else TrigNext.asInteger(0);end;

Statistics: Posted by senso — 19 Jun 2022, 09:31


]]>
2022-06-18T01:43:02+02:00 2022-06-18T01:43:02+02:00 https://brainmodular.com/forums/viewtopic.php?t=7011&p=44155#p44155 <![CDATA[Re: How to trig in fastscript… ?]]> then back to 0.
The Process procedure is called once per processing bloc.
So you cannot do it in a single call to Process. You need to set the trigger output to 1 and also set a flag that will tell you to set
it back to 0 on the next call to Process.

This also implies you cannot have a trigger every bloc, you need 2 blocs to complete the trigger.
I'm not sure at what precise instant in the 1,0 sequence the trigger actually occurs.

Simon.

Statistics: Posted by sm_jamieson — 18 Jun 2022, 01:43


]]>
2022-06-17T11:35:28+02:00 2022-06-17T11:35:28+02:00 https://brainmodular.com/forums/viewtopic.php?t=7011&p=44154#p44154 <![CDATA[How to trig in fastscript… ?]]>
In a script, I'm wondering how to send a trig signal to a trig output:

CODE:

// trigger outputTrigNext := CreateParam('trig next',ptButton,pioOutput);
I suppose I should insert something like a "doevents" between "TrigNext.asInteger(1);" and "TrigNext.asInteger(0);", but I don't know how to code that.

CODE:

TrigNext.asInteger(1);// something to insert here, but what?TrigNext.asInteger(0);
I did not find a page with some infos on procedures and functions…

Thanks for the help.
Have a good day.

Vincent

Statistics: Posted by Vincent — 17 Jun 2022, 11:35


]]>
BrainModular BrainModular Users Forum 2022-06-30T22:05:19+02:00 https://brainmodular.com/forums/app.php/feed/topic/7011 2022-06-30T22:05:19+02:00 2022-06-30T22:05:19+02:00 https://brainmodular.com/forums/viewtopic.php?t=7011&p=44162#p44162 <![CDATA[Re: How to trig in fastscript… ?]]>
Sorry for the delay: I did not recieve any alert... maybe a small bug in the forum...

Thanks anyway for your answers.
And yes of course, I understand now it has to be handled by the Process procedure!

Have a good day.

V

Statistics: Posted by Vincent — 30 Jun 2022, 22:05


]]>
2022-06-19T09:31:22+02:00 2022-06-19T09:31:22+02:00 https://brainmodular.com/forums/viewtopic.php?t=7011&p=44158#p44158 <![CDATA[Re: How to trig in fastscript… ?]]>

CODE:

// flagvar sendTrigger:boolean;Procedure Process;begin      if sendTrigger      then begin            TrigNext.asInteger(1);            sendTrigger := false;      end      else TrigNext.asInteger(0);end;

Statistics: Posted by senso — 19 Jun 2022, 09:31


]]>
2022-06-18T01:43:02+02:00 2022-06-18T01:43:02+02:00 https://brainmodular.com/forums/viewtopic.php?t=7011&p=44155#p44155 <![CDATA[Re: How to trig in fastscript… ?]]> then back to 0.
The Process procedure is called once per processing bloc.
So you cannot do it in a single call to Process. You need to set the trigger output to 1 and also set a flag that will tell you to set
it back to 0 on the next call to Process.

This also implies you cannot have a trigger every bloc, you need 2 blocs to complete the trigger.
I'm not sure at what precise instant in the 1,0 sequence the trigger actually occurs.

Simon.

Statistics: Posted by sm_jamieson — 18 Jun 2022, 01:43


]]>
2022-06-17T11:35:28+02:00 2022-06-17T11:35:28+02:00 https://brainmodular.com/forums/viewtopic.php?t=7011&p=44154#p44154 <![CDATA[How to trig in fastscript… ?]]>
In a script, I'm wondering how to send a trig signal to a trig output:

CODE:

// trigger outputTrigNext := CreateParam('trig next',ptButton,pioOutput);
I suppose I should insert something like a "doevents" between "TrigNext.asInteger(1);" and "TrigNext.asInteger(0);", but I don't know how to code that.

CODE:

TrigNext.asInteger(1);// something to insert here, but what?TrigNext.asInteger(0);
I did not find a page with some infos on procedures and functions…

Thanks for the help.
Have a good day.

Vincent

Statistics: Posted by Vincent — 17 Jun 2022, 11:35


]]>