Axys move randomly

Moderators: TomKerekes, dynomotion

Post Reply
4minnovations
Posts: 45
Joined: Fri Nov 01, 2019 7:18 pm

Axys move randomly

Post by 4minnovations » Thu Apr 01, 2021 2:35 pm

Hi Tom,
I run your dynomotion with snapamp and a konnex module for operate a pick and place machine. All work perfecly for a long time, but some time, the axys start to move randomly or just certain axe stop to run and the other still running.

A power reset on the kflop doen't solve this issue. As soon as power on, the axys move randomly and smash to the hard limit.

For a restart, we need to close the kmotion software, power reset the kflop and reopen the software.

In operation, in the beginning, we run PAL-XPSAFv1-InitAxes.c and after open PAL-Master-with XPSAF-v1.c in the thread 1. We use cnc kmotion to do launch the c threads.

We put some time in programmation to solve this issues and it still remain. We try many stategy on the reiniating of the axys.

When we are there and test the machine for hundred of cycles, we have no issue. Suddently, the machine start to behave random.

When the machine is in bug condition, for one axys, the others motions on other axys still running and move a random ammount of ask motion then the sequence pass to the next step like the checkdone was reach. But in reality, the axys didn't complete the motion.
Attachments
screen.zip
(53.34 KiB) Downloaded 4 times
program C.zip
(49.57 KiB) Downloaded 6 times

4minnovations
Posts: 45
Joined: Fri Nov 01, 2019 7:18 pm

Re: Axys move randomly

Post by 4minnovations » Fri Apr 02, 2021 1:00 pm

Hi,
I would like to know wich c program the kflop use, because I think of sometime the kflop use the wrong c program.

With a button in the kmotionCNC, I lauch my principal c program in the thread #1 from the PC. I think that sometime after a reboot, the kflop use the principal c program in the flash memory. This is possible?

User avatar
TomKerekes
Posts: 1515
Joined: Mon Dec 04, 2017 1:49 am

Re: Axys move randomly

Post by TomKerekes » Fri Apr 02, 2021 3:57 pm

Hi,

I don't see anything obvious. The C Code is very complex and I don't understand how it is supposed to work. Maybe you could explain how KFLOP is commanded to do things.

I can't load the Screen as there are many missing files. Mainly from: \documents4M_PAL\image
When the machine is in bug condition, for one axys, the others motions on other axys still running and move a random ammount of ask motion then the sequence pass to the next step like the checkdone was reach. But in reality, the axys didn't complete the motion.
I don't completely understand what you are saying. But CheckDone() returns -1 if the axis is disabled which is also considered as True as a condition. So you might change Code like this:

Code: Select all

			if((CheckDone(0))&&(CheckDone(1))&&(CheckDone(2)))
To:

Code: Select all

			if((CheckDone(0)==1)&&(CheckDone(1)==1)&&(CheckDone(2)==1))
So a disable will still be considered Not Done. Or check for -1 and display an error.

Probably not an issue but: void estopEnclenche(int choixErreurAfficher);
is used before being defined.

"long" are used instead of "int". This shouldn't be an issue but don't recommend it.
A power reset on the kflop doen't solve this issue. As soon as power on, the axys move randomly and smash to the hard limit.
KFLOP defaults to all axes disabled on power up. So your program or screen must be enabling things for anything to move. Or you have Flashed a configuration or program.

I would like to know wich c program the kflop use, because I think of sometime the kflop use the wrong c program.

With a button in the kmotionCNC, I lauch my principal c program in the thread #1 from the PC. I think that sometime after a reboot, the kflop use the principal c program in the flash memory. This is possible?
KFLOP uses whatever program has been loaded and commanded to execute. We don't recommend Flashing any configuration or Programs to KFLOP as Users often forget what changes they made to KFLOP. I suggest you remove any Programs and reset to KFLOP to the default configuration by re-Flashing "New Version".
Regards,

Tom Kerekes
Dynomotion, Inc.

4minnovations
Posts: 45
Joined: Fri Nov 01, 2019 7:18 pm

Re: Axys move randomly

Post by 4minnovations » Tue Apr 06, 2021 12:54 pm

Thanks tom,
I know the program is really complicated, but i will make some changes as suggested in your answer.
In addition, I will make sure to return to the default configuration by re-flashing "New version".

Post Reply