]]>
2014-04-26T17:02:44+02:002014-04-26T17:02:44+02:00https://brainmodular.org/forums/viewtopic.php?t=4365&p=29387#p29387Statistics: Posted by oli_lab — 26 Apr 2014, 17:02
]]>2014-04-26T15:51:52+02:002014-04-26T15:51:52+02:00https://brainmodular.org/forums/viewtopic.php?t=4365&p=29386#p29386 I'm a bit unclear as to how your changes make the script work. Is it the setformat() function that fixes the setvalue() issue? (I see by the ftrace() that the counter is working within my script. It seems that the output doesn't want to display these values.)
]]>2014-04-26T15:40:24+02:002014-04-26T15:40:24+02:00https://brainmodular.org/forums/viewtopic.php?t=4365&p=29385#p29385 rocedure Callback(N:integer); begin case N of 0: begin c := c + 1; if (c = 20) then c := 0; SetValue(countr,c); end; 2: begin c := 0; SetValue(countr,0); end; end; end;
Statistics: Posted by oli_lab — 26 Apr 2014, 15:40
]]>2014-04-26T15:35:37+02:002014-04-26T15:35:37+02:00https://brainmodular.org/forums/viewtopic.php?t=4365&p=29384#p29384// Basic counter ///////////////////////// // parameters declaration var incx : TParameter; var countr : TParameter; var reset : TParameter; // Global variables var c : single;
Procedure Callback(N:integer); begin case N of 0: begin SetValue(countr,GetValue(countr) + 1); end; 2: begin c := 0; SetValue(countr,0); end; end; end;
Statistics: Posted by oli_lab — 26 Apr 2014, 15:35
]]>2014-04-26T03:11:16+02:002014-04-26T03:11:16+02:00https://brainmodular.org/forums/viewtopic.php?t=4365&p=29383#p29383 ////////////////////////// // Basic counter ///////////////////////// // parameters declaration var incx : TParameter; var countr : TParameter; var reset : TParameter;
Procedure Callback(N:integer); begin if (n = incx) OR (n = reset) then begin fTrace(c); c := c - (c*getValue(reset)); c := c+getValue(incx); setValue(countr,c); end; end;
]]>BrainModularBrainModular Users Forum2014-04-26T17:03:44+02:00https://brainmodular.org/forums/app.php/feed/topic/43652014-04-26T17:03:44+02:002014-04-26T17:03:44+02:00https://brainmodular.org/forums/viewtopic.php?t=4365&p=29388#p29388Statistics: Posted by ahonoe — 26 Apr 2014, 17:03
]]>2014-04-26T17:02:44+02:002014-04-26T17:02:44+02:00https://brainmodular.org/forums/viewtopic.php?t=4365&p=29387#p29387Statistics: Posted by oli_lab — 26 Apr 2014, 17:02
]]>2014-04-26T15:51:52+02:002014-04-26T15:51:52+02:00https://brainmodular.org/forums/viewtopic.php?t=4365&p=29386#p29386 I'm a bit unclear as to how your changes make the script work. Is it the setformat() function that fixes the setvalue() issue? (I see by the ftrace() that the counter is working within my script. It seems that the output doesn't want to display these values.)
]]>2014-04-26T15:40:24+02:002014-04-26T15:40:24+02:00https://brainmodular.org/forums/viewtopic.php?t=4365&p=29385#p29385 rocedure Callback(N:integer); begin case N of 0: begin c := c + 1; if (c = 20) then c := 0; SetValue(countr,c); end; 2: begin c := 0; SetValue(countr,0); end; end; end;
Statistics: Posted by oli_lab — 26 Apr 2014, 15:40
]]>2014-04-26T15:35:37+02:002014-04-26T15:35:37+02:00https://brainmodular.org/forums/viewtopic.php?t=4365&p=29384#p29384// Basic counter ///////////////////////// // parameters declaration var incx : TParameter; var countr : TParameter; var reset : TParameter; // Global variables var c : single;
Procedure Callback(N:integer); begin case N of 0: begin SetValue(countr,GetValue(countr) + 1); end; 2: begin c := 0; SetValue(countr,0); end; end; end;
Statistics: Posted by oli_lab — 26 Apr 2014, 15:35
]]>2014-04-26T03:11:16+02:002014-04-26T03:11:16+02:00https://brainmodular.org/forums/viewtopic.php?t=4365&p=29383#p29383 ////////////////////////// // Basic counter ///////////////////////// // parameters declaration var incx : TParameter; var countr : TParameter; var reset : TParameter;
Procedure Callback(N:integer); begin if (n = incx) OR (n = reset) then begin fTrace(c); c := c - (c*getValue(reset)); c := c+getValue(incx); setValue(countr,c); end; end;