Host Engineering Forum
General Category => CTRIO and CTRIO2 => Topic started by: mabillock on October 27, 2016, 11:22:56 AM
-
I'm having an issue with the on board high speed counter not counting my encoder. Using a 500 pulse per 10" revolution encoder. I have the code in the DL06 exactly to the example in the manual. Looking for any help/guidance at all.
-
Please zip and attach your project (be sure to include updated data tables by doing a 'Save Project To Disk'. I'll have to assume the inputs are wired correctly but it may help to also attach your wiring diagram.
When I was first using the internal high speed counter and had problems some of the reasons I found:
1. I didn't initialize the set up V memory locations correctly
2. I was using the wrong counter
3. I didn't include the required Enable Interrupt (ENI) command
-
I have checked and double checked everything you stated and even just "initialized the scratchpad" and reloaded everything. first off the encoder input X0 isn't even picking up the encoder pulses. I have used a scope and the pulses were hitting 12V range and it was not changing state on the status of the program.
-
Not to be snide, but so far you have told us your quasi-generic PLC isn't working like you want it to.
We don't know which model you have.
We don't know which mode you are trying to configure.
We don't know how it is wired.
We don't know how many channels your encoder has and how they are wired.
We know you have at least one encoder channel switching at 12VDC levels.
We know you don't see X0 status changing somewhere.
You really are going to have to help us help you.
Lastly, this is a forum for the CTRIO cards which are not what you are trying to use at all, but that is not as important as the other things.
-
Your 12 volt signal implies that the wiring between the encoder and the input is not correct. Check the wiring diagrams for DL06 high speed inputs AND check the type of output for your encoder. Look at the actual printed specs for the encoder. It may be that output frrom the encoder and your methodd of input wiring are not compatible.
But for us to help (which generally means we have to read the manuals for you) we need very specific information. Mike outlined what is needed.
-
I am working with a DD-O6DD2-0 DirectLogic PLC trying to program it in Mode 10 on the HSIO and my encoder has 2 channels but I only need one channel. We have it wired to send back the encoder's output to the X0 input. I appreciate the help and guidance.
About the CTRIO forum that was just not paying attention to where I posted.
I am new to this whole PLC career and I am trying to learn on the fly the jargon and everything else in the field. Thanks for the assistance guys.
I am currently looking for the differences you mentioned in the encoder's output to see if it can even be read by the input on our PLC, b_carlton.
-
Please post how you have the encoder wired.
If you can read 12 volts from X0 to the DC power supply, but the X0 light is not coming on, then it is probably because the common is not hooked up correctly.
It is really hard to help when we don't know what you have. The details make a big difference.
-
The encoder I am using is an Accu-Coder encoder part#716-1000-S-S-6-S-S-N S159, it has a 6 pin connector and we are using 4 with it wired
A +VDC
B com
C A
D B
It appears that the PLC is not reading the peaks at 12 V and only seeing closer to 6V because the input indicator light is dim and on constant. Also my counter using UDC CT174 is not counting up in MODE 10. Let me know what you think.
-
My logic in the program looks like this
SP0 LD K10
|| OUT V7633
LD K1
OUT 7634
LD K1
OUT 7635
LD K6
OUT 7636
LD K6
OUT 7637
C411
|| UDC CT174 K99999999
SP2
|/|
SP2
| |
-
If I am decoding the part number correctly, it looks like it needs a pull up resistor to achieve the correct voltage levels.
See page 10 of the wiring guide (http://www.clrwtr.com/PDF/Accu-Coder/Accu-Coder-Installation-Wiring-Guide.pdf).
-
The encoder has internal pullup resistors. But the Preload input should either be a N.O. SP2 or a N.C. SP1.
SP1 is Always On, SP2 is Always Off. Your Preload is always enabled, which is probably what is killing your count.
-
Mike you are correct about the internal resistor on the encoder and I changed to a N.O. sp2 contact as my preload input. I double checked that the internal resistance on the encoder is correct and in line with the wiring guide ADC posted.
-
IF you can, you should try 24VDC for the encoder supply. This should get your input level up into non-iffy territory, at least while you debug.
Strip your program to just what you posted to prevent other code from stomping on your counter.
Cycle from program to run to be sure the counter gets set up correctly (SP0 is true only on first scan.)
Try another input to see if X0 got fried. Stuff happens. If you can see it turn on elsewhere X0 should work and count.
-
Mike, we are feeding the encoder with 24V and when I check voltage on the wire coming from the encoder it is 24V and after I land it on the terminal X0 it drops to 12V and once the machine is running the voltage reading on X0 from the encoder is just over 6V. This is what is so confusing. It could also be the problem why the X0 input is not catching the encoder counts.
-
The 12V is due to the 1.5K pullup and the 1.8K PLC input impedance giving you a voltage divider. The 6V is just the meter averaging 12V and 0V at 50% duty cycle.
On voltage has to be greater than 10V so you should be OK but...
Theoretically 24V * 1.8/(1.8+1.5) = 13.09V .
Your encoder can handle 250mA so 24V/0.250A = 96 Ohm Pullup minimum allowed value.
Add a 1.5K resistor between X0 and 24V encoder supply. That should bring your off state voltage up to 24*1.8(1.8+0.75)=16.9V and only load your encoder to 24V/750=0.032A or 32mA.
-
Mike, I used a potentiometer to get the resistance up due to the fact that I did not have a resistor handy, I was able to get the voltage close to 18V and the counter did not count up. Then I took the encoder off the machine and turned it slower and the input wasn't even changing with pot wired in. I can get the input to change when I move the wheel slowly.
-
Don't know what the DL06 input circuit is, but the inputs on Host products are current devices and require a minimum of a few milliamps to turn on. Sounds like you may not have enough current.
-
Mike, I used a potentiometer to get the resistance up due to the fact that I did not have a resistor handy, I was able to get the voltage close to 18V and the counter did not count up. Then I took the encoder off the machine and turned it slower and the input wasn't even changing with pot wired in. I can get the input to change when I move the wheel slowly.
Time to regroup.
Just take everything loose from C0, X0, X1, X2 and X3 on the bottom terminal strip.
Jumper C0 on bottom to OV on top and use a wire from 24V on top to X0 on the bottom to make X0 turn on and off.
Does the X0 LED work?
Do you see X0 turning on and off in a Data View?
Does CTA174 increase in value?
If not, switch C0 and X0 so C0 is 24VDC just in case one polarity of the opto in the PLC has failed.
If that works, then the encoder or it's wiring may be at fault. If that doesn't work, ignore the encoder until get it to work.
You do have a D0-06Dxx I am assuming.