Announcement

Collapse
No announcement yet.

H2-CTRIO raw output data conversion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • H2-CTRIO raw output data conversion

    We are currently utilizing a TRD-GK1000-RZD Incremental Encoder, 1000 PPR, attached to a wheel that is used to measure the linear payout of an Aluminum tube stock. The signal from the encoder is processed with a H2-CTRIO,High Speed Counter Interface Module. The H2-CTRIO is setup as a quadrature counter for inputs A and B with a 2X multiplier to increase the accuracy to 2000 PPR. The position scaling is set to inches with a BCD X 100 output resulting in a scaled value of 9.29" for a raw count of 2000. The scaled output is loaded into V-Memory as 929. This value must be compared to setpoints selected by the customer. These setpoints are stored in V-Memory with the last three digits as implied decimal places. The action is to set a coil when the comparison of the H2-CTRIO to the setpoint is equal. Multiplying the H2-CTRIO output by 10 results in an implied 3 decimal places for the output and can be compared to the 3 decimal place setpoint, but the compare will only be equal if the setpoint ends with a zero. The best method would seem to be to work with the raw output from the H2-CTRIO. This output would need to be multiplied by 1000 and divided by 215 which should result in a correctly scaled output with 3 implied decimal places which can be comapred to the 3 decimal place setpoints. I have attempted this method and I do not get the correct data. I must not be doing the number conversion incorrectly. Could anyone show the correct logic sequence to achieve this conversion and comarison to achieve a three decimal place accuracy.
    Last edited by dkimberlin; 07-01-2011, 11:17 AM.
Working...
X