News:

  • February 01, 2023, 08:38:45 AM

Login with username, password and session length

Author Topic: DL06 on board high speed counter  (Read 8890 times)

mabillock

  • Jr. Member
  • **
  • Posts: 14
DL06 on board high speed counter
« 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.

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: DL06 on board high speed counter
« Reply #1 on: October 27, 2016, 01:30:55 PM »
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
An output is a PLC's way of getting its inputs to change.

mabillock

  • Jr. Member
  • **
  • Posts: 14
Re: DL06 on board high speed counter
« Reply #2 on: October 27, 2016, 01:50:11 PM »
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.

Mike Nash

  • Hero Member
  • *****
  • Posts: 632
Re: DL06 on board high speed counter
« Reply #3 on: October 27, 2016, 03:14:17 PM »
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.


b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: DL06 on board high speed counter
« Reply #4 on: October 27, 2016, 07:08:42 PM »
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.
An output is a PLC's way of getting its inputs to change.

mabillock

  • Jr. Member
  • **
  • Posts: 14
Re: DL06 on board high speed counter
« Reply #5 on: October 28, 2016, 08:19:32 AM »
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.

plcnut

  • Hero Member
  • *****
  • Posts: 803
    • premiersi.com
Re: DL06 on board high speed counter
« Reply #6 on: October 28, 2016, 01:07:29 PM »
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.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

mabillock

  • Jr. Member
  • **
  • Posts: 14
Re: DL06 on board high speed counter
« Reply #7 on: November 07, 2016, 11:46:45 AM »
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.

mabillock

  • Jr. Member
  • **
  • Posts: 14
Re: DL06 on board high speed counter
« Reply #8 on: November 07, 2016, 01:06:39 PM »
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
| |

ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: DL06 on board high speed counter
« Reply #9 on: November 07, 2016, 01:12:27 PM »
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.

Mike Nash

  • Hero Member
  • *****
  • Posts: 632
Re: DL06 on board high speed counter
« Reply #10 on: November 07, 2016, 01:33:16 PM »
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.

mabillock

  • Jr. Member
  • **
  • Posts: 14
Re: DL06 on board high speed counter
« Reply #11 on: November 07, 2016, 02:28:13 PM »
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.

Mike Nash

  • Hero Member
  • *****
  • Posts: 632
Re: DL06 on board high speed counter
« Reply #12 on: November 07, 2016, 02:37:38 PM »
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.

mabillock

  • Jr. Member
  • **
  • Posts: 14
Re: DL06 on board high speed counter
« Reply #13 on: November 07, 2016, 03:12:47 PM »
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.

Mike Nash

  • Hero Member
  • *****
  • Posts: 632
Re: DL06 on board high speed counter
« Reply #14 on: November 07, 2016, 04:25:38 PM »
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.