mr_electrician Posted October 1, 2021 Report Posted October 1, 2021 Hello guys. Been awhile since I have been on here. I am wanting to integrate a 10 Bit Automation Direct Encoder into some logic that will reside in a CP1H Processor. I have used the first 10 inputs of the CP1W-40EDR expansion module and need to get those inputs into a word, which then hopefully would be used in the GRY (474) function. Does anyone have any insight on how I would gather those 10 inputs into a word? Encoders (automationdirect.com)
photovoltaic Posted October 1, 2021 Report Posted October 1, 2021 You'll need to use something other than D registers at first as they don't have bit-access. W or H I would recommend. You could simply map the CIO bit to the W bit in the correct MSB-LSB order.
mr_electrician Posted October 14, 2021 Author Report Posted October 14, 2021 On 10/1/2021 at 8:35 AM, photovoltaic said: You'll need to use something other than D registers at first as they don't have bit-access. W or H I would recommend. You could simply map the CIO bit to the W bit in the correct MSB-LSB order. Thanks for the reply. I ended up mapping my 10 inputs to W15 and then grapping only the first 10 bits of that word. Works like a charm!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now