Filter test code failure 1

#48239

Colin
  • Topics: 6
  • Replies: 13
  • Posts: 19

Filter test code failure 1

Hi,

This is the first run at the code from the spec. of the previous posting. Simple enough:

Capture3

This shows the code was accepted by the script editor.

This is the script:

=========================

// Filter setpoints Non_1 = 4; // A->B interval threshold Nih_1 = 3; // number of A pulses to inhibit after next B pulse //Filter inputs A_1 = CLOSE() CrossesAbove MA(); B_1 = CLOSE() CrossesBelow MA() ; // Filter processing A_1_cnt = COUNTMATCHSINCESIGNAL( 1, A_1 and (inhibit_1[1] == 0) ); B_1_cnt = Nih_1 + 1 – COUNTMATCHSINCESIGNAL( 1, B_1 and (A_1_cnt >= Non_1) ); inhibit_1 = SWITCH( (A_1_cnt >= Non_1), (B_1_cnt <= 0) ); // Filter outputs A_2 = A_1 and (inhibit_1 == 0); B_2 = B_1; // Plot values plot1 = 12 + A_1; plot1.Plotstyle = Step; plot1.Colour = Blue; plot2 = 10 + B_1; plot2.Colour = Red; plot2.Plotstyle = Step; plot3 = A_1_cnt; plot3.Colour = Blue; plot3.Plotstyle = Step; plot4 = B_1_cnt; plot4.Colour = Red; plot4.Plotstyle = Step; plot5 = -4+inhibit_1; plot5.Plotstyle = Step; plot5.Colour = Black; plot6 = -6 + A_2; plot6.Colour = Blue; plot6.Plotstyle = Step; plot7 = -8 + B_2; plot7.Colour = Red; plot7.Plotstyle = Step; plot8 = 0.0; plot8.Colour = Gray; plot8.Plotstyle = line; plot8.Linestyle = LongDashDotDot;

=====================

I could not use the editor PRE/POST option. It simply didn’t allow me to. Sorry!

This is what the failed output looks like:

Capture4

I look forward to forum advice!

cheers

colin

 

 

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close