Jump to content
OMRON Forums

JHW Handwheel Encoder addressing


iannicholson

Recommended Posts

I have a need to use the JHW port on the Turbo Clipper to read a quadrature encoder input. It seems there is no mention of actually using the JHW inputs in the manuals (it shows how to hook them up, but not how to read them). Can I assign an M-var to the handwheel input(s) and read them like they were motor positions? If it is in the manuals where should I be looking?

 

Thanks!

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Turbo pmac treat the "servo IC" of the handwheel as a macro IC.

See the codes below,you can use the handwheel as a general pulse+direction axis.

I6800 = 1001 ; PWM frequency 29.4kHz, PWM 1-4

I6801 = 5 ; Phase Clock 9.8kHz

I6802 = 3 ; Servo frequency 2.45kHz

I6803 = 1780 ; ADC frequency

i1300=1

i6804=15

i6810=7

i6816=3

i1302=$78414

i1324=$120001

i1325=$78410 ;first supplementary registers respectively

i8012=$c78410

I1303=$350d

I1304=$350d

i1323=-5 ;Motor xx Home Speed and Direction

Link to comment
Share on other sites

Turbo pmac treat the "servo IC" of the handwheel as a macro IC.

See the codes below,you can use the handwheel as a general pulse+direction axis.

I6800 = 1001 ; PWM frequency 29.4kHz, PWM 1-4

I6801 = 5 ; Phase Clock 9.8kHz

I6802 = 3 ; Servo frequency 2.45kHz

I6803 = 1780 ; ADC frequency

i1300=1

i6804=15

i6810=7

i6816=3

i1302=$78414

i1324=$120001

i1325=$78410 ;first supplementary registers respectively

i8012=$c78410

I1303=$350d

I1304=$350d

i1323=-5 ;Motor xx Home Speed and Direction

 

wenming,

 

Thanks for the info. We have run into another problem so I can't test your suggestion just yet. I will try to follow-up when we get that far.

Link to comment
Share on other sites

  • 3 weeks later...

Just a follow-up:

 

We were eventually able to work through our issues and put your advice into use. It works great! Thanks!

 

We were trying to use the {axis}={position} notation in a PLC to reassign our position once a flag is triggered. We found that the following would work:

 

CMD"&2B=-35"

 

while this just wouldn't:

 

CMD"&2B=(P100*-1)"

;or

CMD"&2B=P100"

 

Can this notation not handle a variable distance to set to? If so, there must be similar way to PSET to a variable within a PLC, correct?

 

In the end, we had to assign a constant to the axis instead of a variable, and make up the difference later.

 

Thanks for all your help!

Link to comment
Share on other sites

The {axis}={data} online command can only accept a numeric literal. You can however use the PSET command in your motion programs – this will accept a valid PMAC variable expression. You can also set directly the Position Bias register directly (Suggested M-variable definitions Mxx64) from a PLC with the properly scaled count value.
Link to comment
Share on other sites

The {axis}={data} online command can only accept a numeric literal. You can however use the PSET command in your motion programs – this will accept a valid PMAC variable expression. You can also set directly the Position Bias register directly (Suggested M-variable definitions Mxx64) from a PLC with the properly scaled count value.

 

Steve,

 

We are trying to do the "PSET" analogy in our PLC because this axis is in a different coordinate system than the main motion program. This is done to avoid problems closing the servo loop on &1 because this axis does not have a motor. I imagine that we could run a short motion program on the &2 just to do this PSET, but it seems like a lot of overhead.

 

I gather then that the ideal way to make this happen in a PLC is to use the Position Bias register and multiply our position in inches by the current scale-factor to get the proper units? This was the solution that I had decided on, but I was under pressure to come up with a quick fix solution at the time so I haven't tried this.

 

As a side note, do the newer PMACs support a variable in the {axis}={data} command? Seems like a handy feature.

 

Thanks everyone!

Link to comment
Share on other sites

A couple of notes on this:

 

The syntax description for this command is {axis}={constant}, not {axis}={data}. The {data} specifier indicates the choice of a constant without parentheses, or a mathematical expression inside parentheses. But if the description shows "{constant}", expressions are not supported in the syntax (as with most on-line commands).

 

As Steve says, you can set the position-bias register directly (which is what the command affects). Remember that if you do this, you must execute a "PMATCH" command for the coordinate system before the next programmed move in the coordinate system. (PMATCH is automatically executed on a Run or Step command.)

 

Yes, the Power PMAC is more flexible in this regard.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...