[solved] Catch22 LinuxCNC is loaded?

More
04 Jan 2021 13:53 - 04 Jan 2021 13:57 #194034 by ikkuh
I have a cheap Chinese BOB attached to the P1 connector on the 7i96, this works nicely for the outputs and the pwm signal for my spindle. I got that working with a lot of help: forum.linuxcnc.org/38-general-linuxcnc-q...i96-with-paralel-bob
Problem with the BOB connected to the 7i96 is that during startup all the outputs are high on the BOB. Solution would have been the charge-pump, I asked for help about that here: forum.linuxcnc.org/24-hal-components/410...n-linuxcnc-is-loaded

I got that working after a while, the documentation is clear maybe for an expert but not for me.
After some trouble getting the right signal (spoiler alert, it is
motion.motion-enabled
) I end up with a catch22 situation.

custom.hal
#charge pump
  loadrt charge_pump
  addf charge-pump servo-thread
  net myCPname charge-pump.enable => hm2_7i96.0.ssr.00.out-04

I use the motion.motion-enable signal to switch the 5 volt to the BOB that is attached to the 7i96. A relay is fired and switches on the BOB when motion.motion-enable is true. This kinda works, the relay switches on and the BOB is powered on. But the problem is that when the 7i96 boots it checks if there is something connected to connector P1. Since there is no power to the BOB during startup there are no pins available.

I found this in the 7i96 manual, but not a solution:

EXPANSION CONNECTOR STARTUP I/O VOLTAGE
After power-up or system reset and before the the FPGA is configured, the pull-up
resistors will pull all I/O signals to a high level. If the FPGA is used for motion control or
controlling devices that could present a hazard when enabled, external circuitry should be
designed so that this initial state (high) results in a safe condition.


So when everything is started up there are no pins available through P1. But at least my compressor, suction, vacuum and other stuff do not start right away when I startup the machine ;)

Question:
What would be a better way to have the outputs of the BOB low during startup?
Last edit: 04 Jan 2021 13:57 by ikkuh.

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

More
04 Jan 2021 15:58 #194049 by PCW
Replied by PCW on topic Catch22 LinuxCNC is loaded?
That's not true, P1 pins are are always available if you have communication with the 7I96.
There is no checking for connected devices (with the single exception of sserial devices
which is not relevant with your BOB)

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

More
04 Jan 2021 16:27 #194053 by ikkuh
Replied by ikkuh on topic Catch22 LinuxCNC is loaded?

That's not true, P1 pins are are always available if you have communication with the 7I96.
There is no checking for connected devices (with the single exception of sserial devices
which is not relevant with your BOB)


It is true. When I start LinuxCNC with no power to the bob on P1 then I get an error message from LinuxCNC that io.036 can not be found. When I bypass the relay and start LinuxCNC with bob powered on P1 everything works as expected. I can send you the exact messages tomorrow when I am at the machine again.

But I am fed up with finding solutions for problems I did not ask for, so I installed another bob today but this time on the parallel port and I use that. No problems at all.
There are just to many problems/lack of proper documentation to use the P1 connector on the Mesa card with a Chinese bob for me.
We are not all scientist and I certainly rather make shavings then jump from problem to problem.

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

More
04 Jan 2021 16:34 - 04 Jan 2021 17:44 #194054 by PCW
Replied by PCW on topic Catch22 LinuxCNC is loaded?
Nope, it is simply not true. Something else is going on

The port state at start up does not affect the enumeration of pins

Here are the available P1 GPIO pins with 7i96_5abob_d.bit firmware and the
stepgens/pwmgens on P1 disabled and all pins open (high) at startup:



Here are the available P1 GPIO pins with 7i96_5abob_d.bit firmware and the
stepgens/pwmgens on P1 disabled and all pins grounded (low) at startup:



All GPIO pins are available in either case

I suspect you have a typo in a pin name or a power issue of some kind so the 7I96
does not start
Attachments:
Last edit: 04 Jan 2021 17:44 by PCW.
The following user(s) said Thank You: ikkuh

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

More
05 Jan 2021 11:30 #194134 by ikkuh
Replied by ikkuh on topic Catch22 LinuxCNC is loaded?

Nope, it is simply not true. Something else is going on

I suspect you have a typo in a pin name or a power issue of some kind so the 7I96
does not start


I am so fed up with solving problem after problem that I took a day off.
Will be in the shop tomorrow and will make some screen prints, I hope it is just a typo since my Mesa card has always been dependable and the/your support is great.

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

More
06 Jan 2021 12:55 #194215 by ikkuh
Hi PCW,

Of course you were right. In the mess getting things to work I accidentally got the wrong hal file from my git repo. Therein was the loadrt line with the wrong number of stepgens. One of the things you especially warned about.
I needed a good night rest to see that mistake.

So thanks once again, I now have so much I/O I don't know what to do with them. But that's a nice problem to have.

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

Time to create page: 0.114 seconds
Powered by Kunena Forum