I converted a program from ML1500 to 1769-l36 compactlogix adding a 1769-HSC. there is no 100 us option for the input filter in the HSC configuration tab, just 10 us, 500 us and 5 ms. Would the result be the same if I use 10 us and divide the raw(ctr0CurrentCount) by 10? The scaler in the 1769-hsc config is set to 1. the encoder resolution is 360 so I set the min and max count to 0 and 359 respectively, used ring counter(for angle measurement),encoder X1. update time 10ms. RPI is 10ms.
I also programmed 2 options to find the angle: either to use the raw value as the angle or compute the change as rdcast used here http://www.plctalk.net/qanda/showthread.php?t=49549:
SUB HSC_RAW_COUNTER_IN Last_Scan_Value Scan_Delta_Count MOV HSC_RAW_COUNTER_IN Last_Scan_Value ADD Scan_Delta_Count Total_Counts Total_Counts
Another question is I read that Local:1:I.Ctr0Overflow is set when a pulse is received after 359 so I should just reset Local:1:O.Ctr1ResetCountOverflow when Local:1:I.Ctr0Overflow is present? The Z signal was not used in the ML program.
I also programmed 2 options to find the angle: either to use the raw value as the angle or compute the change as rdcast used here http://www.plctalk.net/qanda/showthread.php?t=49549:
SUB HSC_RAW_COUNTER_IN Last_Scan_Value Scan_Delta_Count MOV HSC_RAW_COUNTER_IN Last_Scan_Value ADD Scan_Delta_Count Total_Counts Total_Counts
Another question is I read that Local:1:I.Ctr0Overflow is set when a pulse is received after 359 so I should just reset Local:1:O.Ctr1ResetCountOverflow when Local:1:I.Ctr0Overflow is present? The Z signal was not used in the ML program.