Interesting Programming tricks – H2H V4

KHR-1, KHR-2HV, KHR-3HV, ICS servos, RCB controllers and other Kondo products
2 postsPage 1 of 1
2 postsPage 1 of 1

Interesting Programming tricks – H2H V4

Post by Ausrobo » Sun Mar 28, 2010 10:00 pm

Post by Ausrobo
Sun Mar 28, 2010 10:00 pm

I have come across a couple of very interesting features (bugs) with H2H in programming motions. They apply in versions 1.1.2 and 1.1.1.

The analogue compare tool, generally does not work unless the motion is saved, H2H closed down and then opened and the motion is reloaded. I spend some hours tyring to work out why the comparison tool did not work, but this fixes the problem.

The loop control loops continuously if the counter is set to zero before the loop is entered. I was trying to use the loop control as a branch by manipulating the counter using set counter, however, I have found that the loop must execute at least once, otherwise it will keep looping!

A simple variable can be set and used for branching by linking one of the PIO ports to the analogue port. The Configure and set PIO command is then used to set the variable and the analogue compare is used to test and branch.

Also there is an error in the English version of the H2H manual. It shows the PIO as having the Ground pin on the inside of the three pins. This is wrong. The pin order is GND, Vdd, PIO from outside to the centre of the board.
I have come across a couple of very interesting features (bugs) with H2H in programming motions. They apply in versions 1.1.2 and 1.1.1.

The analogue compare tool, generally does not work unless the motion is saved, H2H closed down and then opened and the motion is reloaded. I spend some hours tyring to work out why the comparison tool did not work, but this fixes the problem.

The loop control loops continuously if the counter is set to zero before the loop is entered. I was trying to use the loop control as a branch by manipulating the counter using set counter, however, I have found that the loop must execute at least once, otherwise it will keep looping!

A simple variable can be set and used for branching by linking one of the PIO ports to the analogue port. The Configure and set PIO command is then used to set the variable and the analogue compare is used to test and branch.

Also there is an error in the English version of the H2H manual. It shows the PIO as having the Ground pin on the inside of the three pins. This is wrong. The pin order is GND, Vdd, PIO from outside to the centre of the board.
Ausrobo offline
Savvy Roboteer
Savvy Roboteer
Posts: 35
Joined: Sun Sep 27, 2009 10:05 pm

Post by chrisvo » Wed Mar 31, 2010 5:56 pm

Post by chrisvo
Wed Mar 31, 2010 5:56 pm

I think for the RCB controllers, it is more common to set the loop counter to the number of iterations before entering the loop, and decrement within the loop.

Rule of thumb for pin ordering is that the signal is closer to the CPU.
I think for the RCB controllers, it is more common to set the loop counter to the number of iterations before entering the loop, and decrement within the loop.

Rule of thumb for pin ordering is that the signal is closer to the CPU.
chrisvo offline
Savvy Roboteer
Savvy Roboteer
Posts: 132
Joined: Mon Nov 02, 2009 10:24 pm


2 postsPage 1 of 1
2 postsPage 1 of 1