Question regarding MESA 7i97 analog output

16 Jun 2021 22:29 #212229 by Richard1987
Hello everybody,

I am very new in this forum,and I am a bloody LinuxCNC beginner too.

we got an old bridge mill with YASKAWA analog servodrives (CACR-SR...).
Goal is to do the control of the mill with LinuxCNC via the 7i97 from MESA.
We got a PC with Debian 10 and LinuxCNC 2.8.0.

Before we establish a link to the mill we want to check the 7i97 on the table, learning how to control the board.
The analog outputs of the 7i97 are visualised by oscilloscope, putting a 10kOhm load between ANAout and GND,
the encoder input signals are generated by a piece of hardware (signal generator plus 1 inverter and 2 flipflops), simulating the four signals QA, /QA, QB, /QB of the encoder, and with an additional switch the QB lines can be crossed simulating change of turn direction.

the first approach by using a set of *.ini and *.hal found in this forum, was not successfully, it seemed that the hostmot driver could not recognize the 7i97.

as second approach the pncconf was used, selecting the 7i80hd with SV12 configuration. After that the *.hal-file was manually modified, changing all "7i80hd" to "7i97".
The result was that the axis window opened. There was one error message "hm2: firmware contain unknown function". This could be ignored, seemed to have no impact.
- each of the configured 3 axes could be addressed. Analog outputs respond and encoder inputs result were displayed (xyz)
- when applying steps of 1mm, the encoder must follow to achieve an equal display value. If not, an error message appears (e.g. "joint 2 following error").

The problem seems to be the analog output. In the 7i97 manual the output voltage range is defined by +/-10V. This means, the range should be from -10V to +10V. My understanding is that if the encoder is behind the target position, the voltage should be positive, when it is ahead of the target position, the output voltage should be negative.
When the machine is switched on (in the axis window), all analog outputs jump from 0 to +10V.
When to an axis a step of +1mm is applied, the corresponding analog output drops from +10V to +8V. If after this a step of -1mm is done, the output remains a few seconds on +8V and then goes back to +10V.
The same happens if first a step of -1mm is done and after this of +1mm.
When after a step of +1mm (and responding drop to 8V) the encoder moves the value of the corresponding axis close to this 1mm, the voltage changes from 8V in direction of the 10V. Example: when using 1mm steps: encoder (axis display) from 0 to 0.965mm causes no change (still 8V). when 0.985mm, analog otput changes to some 9V, when 0.995mm, then close to 10V, when >1.000mm, then the voltage goes down and when >1.050mm, the voltage is back on 8V.
It seems as if the whole voltage range is between +8V and +10V only, no matter which step direction or which encoder direction.

Have we something forgottenor done wrong in the config ? (*.hal file or *.ini file) ?? Both files are attached.
Or is there any other explanation for this behaviour ?
We would feel better if we could clarify this before we go to the mill with the 7i97.

Please advice

Thank you

Please Log in or Create an account to join the conversation.

16 Jun 2021 22:46 - 16 Jun 2021 22:46 #212233 by tommylight
Have a read through this, the encoder wiring and checking, then analog setup.
Last edit: 16 Jun 2021 22:46 by tommylight.

Please Log in or Create an account to join the conversation.

17 Jun 2021 01:56 #212250 by PCW
Try this as a basic 7i97 hal/ini file set:

File Attachment:

File Name:
File Size:4 KB

Also you need LinuxCNC 2.8.1 to support the 7I97 and if you got the 7I97
some time ago you should probably update its firmware.

Please Log in or Create an account to join the conversation.

18 Jun 2021 15:18 #212335 by andypugh
To check out cards I tend to leave LinuxCNC out of the system for simplicity.

At the command-line:
loadrt hostmot2
loadrt hm2_eth board_ip=
show pin
loadrt threads
addf thread1
addf hm2_7i97.0.wrire thread1

After the "start" you should see a heartbeat from the card, and then you can "setp" and "show" pins etc. Also "loadusr halmeter" to load a meter, "loadusr halscope" etc.

Type "exit" to exit the interactive HAL session when you are done.

Please Log in or Create an account to join the conversation.

25 Jun 2021 12:53 #212898 by Richard1987
could get the analog outputs working properly,
but now beside encoder inputs and analog outputs (pwm) there seem to be no possibility to get the other inputs and outputs (GPIOs) operating.
Any approach just ends in error messages.

As you wrote, for support of the 7i97 I would need LinuxCNC 2.8.1.,
I just found a release 2.8.1. version for the RASPBERRY PI,
are there any schedules for further releases (don't have Raspberry PI) ?
Or are there any workarounds to get the 7i97 GPIOs working with the 2.8.0 ?

Thank you so far for your support

Please Log in or Create an account to join the conversation.

25 Jun 2021 13:33 #212901 by PCW
The current LinuxCNC release is 2.8.1, you should be able to
update to the latest with:

sudo apt-get update
sudo apt-get dist-upgrade

Please Log in or Create an account to join the conversation.

29 Jun 2021 09:43 #213223 by Richard1987
Yes, these updates help,
now all IOs of the 7i97 can be used, and we will proceede with the card to the mill !

again thank you so much !

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.112 seconds
Powered by Kunena Forum