1794-VHSC Won't Count

whirlair

Member
Join Date
Dec 2007
Location
mn
Posts
64
1794-VHSC Flex IO module. I have a encoder with only 1 channel. So it has 3 wires: 24vdc, vdc common, Channel A. I hook it up and configure the module but get no counts.

I think the problem may be that my encoder has an Open Collector output, which would require 24vdc at the module where channel A hooks up. There does not appear to be 24vdc there. Yet, I cannot find any specs on if the VHSC is sinking or sourcing where the encoder hooks up. Can someone please help me?

If I put an ammeter between 24vdc and the channel A wire and turn the encoder I get current flow so I'm guessing the encoder is working.

Thanks!
 
Last edited:
Proper logic level transistions at the input ?

It is often necessary to apply a resistor to cause the input voltage to be defined when the output of the encoder is in the "off" state. So if the encoder is "sinking" (NPN) then it is going to pull toward the neutral (neg) power supply when it is "on" or True. When it goes to the Off or False condition, a "Pull-Up" resistor may be required in order to get the Counter Input to see a voltage high enough to cross it's logic threshold value to cause it to toggle and therefore to count.
If the encoder is "Sourcing" then the opposite can be true and a "Pull-Down" may be required. An oscilloscope is a really great tool for this test to determine what the Counter Input is actually seeing.



Best Regards,

Bob A.
 
Last edited:
I got it to count, I had to hook it to the A- channel for some reason. Now I can't get the direction to work lol. It says make B channel high at the module to count down, but it does not work.
 
Sorry I was slow to get back, I have too many jobs going at the same time. When I spoke of Pull Up, that implies that you pull the counter input(s) toward the Positive DC supply (For sinking / NPN field devices). And, when I spoke of Pulldown, that means to pull the counter input(s) toward the Negative Supply (for Sourcing / PNP field devices).

Note that this could sometimes be required for any digital input not just a counter. NOTE: Your resistor should be as high as possible, almost. If 2.7 K will work, make it 2.2K, etc.

As for power rating, do your Ohms / Kurchoffs Law: Voltage Drop across the resistor x the resistance = Amps (current) and Voltage x Current = Power (Watts). Whatever the result, double it and take the next larger resistor power rating.

These steps are necessary to protect both the encoder output and the resistor(s). When the device is stopped, if the encoder is on, then it is pulling the resistor current + the input current. When the process is down, the resistor and the counter output will fight each other continuously and things can get cooked.

As I said before, the proper way to confirm what is happening is to put a scope on the counter inputs and determine what voltage transistions are required. If you have a bunch of NEC **** that is difficult to get to, put a paper clip under the screw on the counter inputs and leave it there. Once you see what works, then you can tweek the resistors for the most conservative performance.

If you want to contact me directly, try my e-mail at [email protected]

Best Regards,

Bob A.
 
Hi everyone, I have a new problem that has me baffled.

I am now using a quadrature encoder. It has A channel and B channel, same open collector outputs. I installed the pull up resistors on both channels and wired everything up. When I set my module in counter mode, it reads the pulses but only counts up. If I change it to Encoder X1 mode I get absolutely no counts. Both channel A and B status LEDs on the module blink when I turn the encoder wheel.

Any ideas why I get no counts when the module has both inputs?

Thanks.
 
Whirl,

Glad to see to have gotten the Pull Up figured out. Don't forget to check to see how hot the resistors are getting. Too much heat probably means that they are too low resistance and / or wattage rating too low.

The counter problem sounds like a configuration issue to me. The indicators working means that the requirements for the electronic logic level transistions are being met. I guess that you know that quad mode will give you 4x counts over the single channel mode as well as Up - Down counting.

My first move would be to examine carefully for a configuration element that enables bidirectional counting although I don't really remember having to do that.

I have to do this with a CompactLogix HSC in a few weeks for the first time in about 5 years so I will have to get the refresher course from you!

If I get a minute later, I'll look over the docs for your VHSC. I always used the 1771VHSC and now I've got a 1769HSC to set up.

Best Regards,

Bob A
 
Whirl,

Here is the manual that I checked out:

http://literature.rockwellautomation.com/idc/groups/literature/documents/um/1794-um010_-en-p.pdf

I don't see any Up / Down config, but only the Encoder Mode. I suggest that you focus on the phase relationship at the counter input to be certain that both channels are appearing as they should in the proper phase relationship, etc. Then verify that the 4X Encoder Mode is selected.

Also, be aware that sometimes you have to take an action to force configuration changes down to the hardware. So it is possible to change a setup in the Logix software, but not in the hardware until you force it down.

Since the manual clearly shows that the Up and Down is determined my the B input in 1X and 2X mode and by the phase relationship between A and B in 4X, this is where I would concentrate. I usually use a my Fluke Scopemeter to verify the counter inputs so that there are no surprises and then move on to configuration.

I have a 1769HSC module that is counting at about 40% of where is should and I have checked everything out. Since it is only running at about 1 - 2 Hz it should not be too difficult to figure out, but I have not yet identified the problem so I know how frustrating this can be!

Good Hunting!

Bob A
 
Whirlair

It sounds like the counter is being held in the reset state. What Mode (Mode 1-4, not Counter-Encoder Mode) is the counter configured for? See page 1-6 to 8 of the Instruction Manual (link in post 11) for a description of the Modes and page 4-15 for the configuration bit pattern. Do you have anything connected to the Z input?

By the way, you don't need resistors to connect an open collector encoder to a differential input. Simply connect the A input to +24 volts and the A- input to the encoder. When the encoder transistor turns on, current will flow in the input and when the transistor is off, no current will flow. The current is limited by the resistors in the differential input.
 
Vic said:
Whirlair

It sounds like the counter is being held in the reset state. What Mode (Mode 1-4, not Counter-Encoder Mode) is the counter configured for? See page 1-6 to 8 of the Instruction Manual (link in post 11) for a description of the Modes and page 4-15 for the configuration bit pattern. Do you have anything connected to the Z input?

By the way, you don't need resistors to connect an open collector encoder to a differential input. Simply connect the A input to +24 volts and the A- input to the encoder. When the encoder transistor turns on, current will flow in the input and when the transistor is off, no current will flow. The current is limited by the resistors in the differential input.

Looking at the configuration word, both channels are indeed configured to encoder 1x (bit 0 on, bit 8 on) I do not have a differential encoder, I only have A and B, there is no A- or B- coming from the encoder. This encoder does not have a Z, so it is not hooked up.

The mode is all zeros, so it is set to "store count disabled".

I'm starting to think this stupid AB module will only work with a Line Driver type encoder.
 
Last edited:
whirlair

I'm starting to think this stupid AB module will only work with a Line Driver type encoder.

If the encoder is wired correctly to the HSC, the module won't know the difference between a single ended encoder and a differential output encoder.

If the A and B LEDs are comming on in the correct sequence, the wiring should be right. I still think the module is not configured correctly.

What is the state of the Power/Status LED? Post your code and we will have a look at it.
 
Vic said:
whirlair



If the encoder is wired correctly to the HSC, the module won't know the difference between a single ended encoder and a differential output encoder.

If the A and B LEDs are comming on in the correct sequence, the wiring should be right. I still think the module is not configured correctly.

What is the state of the Power/Status LED? Post your code and we will have a look at it.


Well, I don't have a scope so I can't be 100% sure the pulses are correct, and it is a 1800 cpr so I can't tell just by watching the LEDs.

I think you are probably correct on the configuration (counter reseting) since it will do unidirection counting in the counter mode just fine. I have now found that in encoder mode, if I spin the encoder by hand for a few seconds I can get 1 count up or down depending on direction to show up for a second or so before it resets back to zero counts.

There is no code for this encoder, I am just watching the counts from the controller tags screen.

I do not have a oscilloscope either so my last option will be to try a different encoder, which is not what I want to do for cost reasons.
 

Similar Topics

Hey Everyone, After reading a lot on this forum and elsewhere I see not many are fond of the 1794-VHSC module. I can see to a degree as I was...
Replies
3
Views
152
Hello all. I have an issue I have not been able to find an answer to online. I have a 1794-VHSC connected to a Contrologix PLC and a Sick...
Replies
5
Views
2,413
So I have a customer that wants to replace an outdated PLS (Programmable Limit Switch). The current system uses a resolver and 2 outputs in a...
Replies
2
Views
2,295
Hi all. This would be my first post on this forum, but i have so say i have been following it for quite some time and it has provided me with alot...
Replies
4
Views
3,199
  • Poll
I have a 1794-VHSC card (encoder counter card) connected to a 1794-ADN scanner module. When I try to add the module in the right slot in the ADN...
Replies
7
Views
5,825
Back
Top Bottom