Beckhoff-Switzerland / CHALET_XPlanar

BSD Zero Clause License
0 stars 0 forks source link

DeleteMoversQueue issues #1

Open AMA-Ciposa opened 3 months ago

AMA-Ciposa commented 3 months ago

Bonjour, Je suis Albin Mazéas, je travaille sur le XPlanar chez Ciposa SA. J’ai cependant rencontré un problème sur la dernière version (V4.3.3) de votre librairie. La méthode DeleteMoversQueue du FB FB_XP_Station. Quand j’utilise la méthode, cela me créer une exception dans la méthode Update du même FB (à la ligne 58). Je voulais savoir si l’erreur était dû a une mauvaise utilisation de la méthode. Dans le contraire, est ce possible de corriger le problème? En vous souhaitant une bonne journée, Cordialement Albin Mazéas

Andreas-BACH commented 3 months ago

Thanks for the message.

The update method of the same FB (in line 58) is only called if the system is enabled. I wonder why you want to delete the station queue while station handling is running.

What exactly do you intend to do with it?

Nevertheless, I will prevent this crash in the next version.

Best regards Andreas

AMA-Ciposa commented 3 months ago

Thanks for your answer.

I want to disable a single mover on a buffer station, and when needed, enable it and send it to the next station. However, if I don't delete the mover queue of the buffer station, no movers can go to the buffer station. The DeleteMoversQueue function is needed for this buffer station because I did not find another way to do it.

I hope I was clear. Thank you for your quick answer.

Best regards, Albin

Andreas-BACH commented 3 months ago

I will add this point to the feature request list. I think there are many applications where you want to deactivate a mover in the station. The following currently works: image The mover remains in the station queue. In my opinion, this is a good thing, as there can be no collision. A waiting station can be placed in front of the actual station so that the movers move in this direction.

AMA-Ciposa commented 3 months ago

I agree!

In my code, the fact that the movers queue is not deleted (even if the mover is disabled) can prevent movers from going to that station. However, if I send the movers to the next station, the queue of the buffer station will not be automatically deleted because I can't use the method "SendMoversToStation" (when I enable the mover, it is not at the buffer station). The result of this is that the buffer station's queue is never deleted, which condemns the buffer station.

I wrote my code on CHALET_XPlanar V3.0.0, and it worked. Now I want to adapt it to work with V4.3.3. If you want/need, I can send you my code. It's far from perfect, but it works.