Forum Navigation
You need to log in to create posts and topics.

MPG Will not work with my Masso

12

@cncnutz

Industrial Sensing Fundamentals – Back to the Basics: NPN vs PNP

Check out this web site. Does a pretty good job of explaining pnp ( sinking ). and npn  (sourcing ) inputs and outputs. When I bua a Plc for a project I always get sinking in and sinking out. It's the easiest for me to understand cause all I have to do is supply a pos v to the terminal for it to work. I do believe Masso is sinking inputs and I can't remember how I wired the outputs so not sure there.

(https://automation-insights.blog/2011/01/18/industrial-sensing-fundamentals-back-to-the-basics-npn-vs-pnp/)

Guy

Quote from CNCnutz on March 26, 2020, 12:42 am

@deese

I should mention that I wasn't suggesting that the voltage was the cause of the issue. I mentioned it to illustrate that the MPG was a different unit from the one Masso supplies

The fact that you are seeing the A & B inputs changing probably means that they are working but maybe they don't output the correct sequence.

Another user having the same issue with a third party said they solved their issue by changing the MPG from an NPN unit to a PNP.  What the difference is I don't know. Maybe you will be able to tell me because my research to date has turned up nothing. I don't know if this is your problem or not or even if that is the reason.

https://www.masso.com.au/forums/topic/pendant-issue/?part=1

Cheers Peter

So to my knowledge there are three basic types of encoders.

Open collector NPN this type pulls the input to 0 volts. So if your controller maintained vcc,or 5v,or 12v whatever on a circuit and wanted that circuit pulled to 0 volt to operate it thats what you want.

This type is also called pullup in some units because they use a resistor to pullup the collector(the a,b inputs) to vcc,5v,12v whatever. So when you turn the encoder you get a sq wave from 0v to Vcc.

Problem with this type is the pullup resistor has to be high value to keep current draw low on the NPN transistor when it pulls the signal to 0V, so when you try to use this type with any length of cable

the resistance has to push voltage into the cable passively,and the npn pulls it down actively so you get a really ugly signal on any cable with any parasitic capacitance,and inductance, which is every cable on earth.

Next

Push Pull Type has a totem pole arrangement of pnp,and npn transistors. The input(a,b) is connected at the center so that the pnp pushes voltage into the line,and the npn pulls the voltage down.

So with this type you have active pushing,and pulling of the voltage in the line and it will give a good signal through a cable. Albeit some overshoot on the leading edge of the sq wave,which also come through as artifacts

in your sq wave at the overlap of the a,and b signals. The more parasitics on the cable the worse the artifacts,and overshoot.

Next

Continuation of the push pull is the differential line driver type. Thats where your A,B,-A,-B, come in to play The a,b are the same as push pull signal starts at 0v and is driven to Vcc, in the differential side -a,-b starts

at Vcc and is pulled to 0V so if your controller will accept the differential signals it is supposed to be more reliable.

So my MPG uses a differential line driver type encoder,which I am using the A,B, signals which switch from 0V to Vcc. I am not using the inverted inputs per the masso documentation.

I have connected my mpg to 12 volts this morning,on the bench and tested it. It is perfect,as it was with 5 volts also.

I installed it into my control cabinet,and it behaves exactly as it has the last half a dozen times,no movement in neg direction,only moves positive if you jog it one click at a time or very slow.

I have taken the oscilloscope out to the shop floor and probed the signals at the db15 port on masso,and I have a perfect 12v square wave A,B quadrature signal on pins 3,an 4. With the mpg connected and turning.

With the MPG disconnected.

I have installed a db15 cable and a breakout card so that I could test the inputs of the db15 port. Measured from the db15 body-Ve, pin 1 is controller voltage 24vdc,all other pins are at 0Volts .

I have to assume this is what it should be.

In that other post there was talk about the opto couplers being damaged, arent they socketed in the masso? That would be worth while to swap out I think. I have some dip6 optos that are pretty standard.

I dont know what the masso uses but I could pull the cover off and check.

@deese

Thank you for the explanation. I was unsure if the PNP / NPN was to do with the electrical characteristics of the MPG interface or if it described a particular output signal format.

The optocouple IC's in Masso are all socketed but the fact that you are seeing Masso respond on both the A & B to the signals coming from the  MPG would indicate that they are working.

https://www.masso.com.au/masso-documentation/?section=replacing-optocouplers

I do not have a scope to check what the output signal is but if I turn the MPG very slowly I can see how the A & B behave. In my test I am moving the MPG only 1 division at a time and I can see by looking at the A & B signals that each pulse is made up of 4 states. I had to hold the MPG as it moved between the start and end of the division so I could see each state as it went.

This is with the MPG moving in the -ve direction

  1.  A  Low      B Low   (Start)
  2.  A  High    B Low
  3.  A  High     B High
  4.  A  Low      B High
  5.  A  Low      B Low  (End)

 

This is with the MPG moving in the +ve direction

  1.  A  Low      B Low   (Start)
  2.  A  Low      B High
  3.  A  High     B High
  4.  A  High     B Low
  5.  A Low       B Low  (End)

Maybe you can do the same test with your MPG and see what you get. I think this is where the mystery will be found.

Cheers Peter

Quote from CNCnutz on March 26, 2020, 10:32 am

@deese

Thank you for the explanation. I was unsure if the PNP / NPN was to do with the electrical characteristics of the MPG interface or if it described a particular output signal format.

The optocouple IC's in Masso are all socketed but the fact that you are seeing Masso respond on both the A & B to the signals coming from the  MPG would indicate that they are working.

https://www.masso.com.au/masso-documentation/?section=replacing-optocouplers

I do not have a scope to check what the output signal is but if I turn the MPG very slowly I can see how the A & B behave. In my test I am moving the MPG only 1 division at a time and I can see by looking at the A & B signals that each pulse is made up of 4 states. I had to hold the MPG as it moved between the start and end of the division so I could see each state as it went.

This is with the MPG moving in the +ve direction

  1.  A  Low      B Low   (Start)
  2.  A  High    B Low
  3.  A  High     B High
  4.  A  Low      B High
  5.  A  Low      B Low  (End)

 

This is with the MPG moving in the -ve direction

  1.  A  Low      B Low   (Start)
  2.  A  Low      B High
  3.  A  High     B High
  4.  A  High     B Low
  5.  A Low       B Low  (End)

Maybe you can do the same test with your MPG and see what you get. I think this is where the mystery will be found.

Cheers Peter

I would say that is exactly what it should be,the signals are offset in time 90 degrees a and b overlap 50 percent. I do not believe my controller will display this pattern, but my mpg is outputting the correct signals verified on the scope. I am home now but in the morning I'll test that as the A,B,signals go high the inputs track on the setup screen. But I feel very confident they do not,if  I recall they are just random flickering..

Quote from CNCnutz on March 26, 2020, 10:32 am

@deese

Thank you for the explanation. I was unsure if the PNP / NPN was to do with the electrical characteristics of the MPG interface or if it described a particular output signal format.

The optocouple IC's in Masso are all socketed but the fact that you are seeing Masso respond on both the A & B to the signals coming from the  MPG would indicate that they are working.

https://www.masso.com.au/masso-documentation/?section=replacing-optocouplers

I do not have a scope to check what the output signal is but if I turn the MPG very slowly I can see how the A & B behave. In my test I am moving the MPG only 1 division at a time and I can see by looking at the A & B signals that each pulse is made up of 4 states. I had to hold the MPG as it moved between the start and end of the division so I could see each state as it went.

This is with the MPG moving in the +ve direction

  1.  A  Low      B Low   (Start)
  2.  A  High    B Low
  3.  A  High     B High
  4.  A  Low      B High
  5.  A  Low      B Low  (End)

 

This is with the MPG moving in the -ve direction

  1.  A  Low      B Low   (Start)
  2.  A  Low      B High
  3.  A  High     B High
  4.  A  High     B Low
  5.  A Low       B Low  (End)

Maybe you can do the same test with your MPG and see what you get. I think this is where the mystery will be found.

Cheers Peter

On the setup screen in Masso: Ok I tested that this morning and it is extremely random at best,with the B signal flickering 10 times as much as the A signal,and never in the correct order. Its actually difficult to get the A to flash at all and it does not flash turning slow,you have to snap the mpg dial back and forth or spin it up to get a response on A.

Mpg back at the scope again,again: I took pictures this time. The A and B are in perfect harmony,amplitude correct,timing correct. In the pictures the vertical divisions are 5 volts,and the time/horizontal is 200uS per division. The trigger is set to rising edge on channel A which is the red trace,and channel B is the yellow trace. The scope is set to single shot to capture the individual event,I am clicking the MPG one detent. In the first pictue you will see the red trace goes first which is clockwise or positive rotation of the MPG dial,and the next picture will show the yellow trace will have went first for counterclockwise or negative rotation of the MPG.

Uploaded files:
  • KIMG0355.JPG
  • KIMG0357.JPG

@deese

The reason for the random flickering you see on the F1 screen is the Masso screen refresh rate.

To see the A & B input states you need to minutely control the MPG and move it at glacial speed. Easy to do with your thumb. You should see 4 definite states on the F1 screen matching what you see on the Oscilloscope between each division of the MPG.

If I get time I will video it for you later today so you can see what I mean.

Cheers Peter

 

I did that,it will not display like that no matter how slow you turn it. There is a fault with my optos or the controller,but I have had it for some time and just now tried the mpg so there won't be any warranty or probably any fix for it. I just won't have an mpg. If it wasn't on a machine making parts I would mail it to you and you could have at it.

@deese

All the optocouples on Masso are the same so you can swap them of you think you have faulty ones. Your probably not using the rotary encoder so those would be good ones to use. U33, U34 & U35

MPG A & B are U36 & U37

Also check the ground of your pendant as the Masso pendant gets its -ve through the shell of the pendant and not one of the pins. It's really curious.

Cheers Peter

12