Advanced Search

Search Results (Searched for: )

  • Aciera
  • Aciera's Avatar
18 Mar 2025 13:41 - 18 Mar 2025 13:43
Replied by Aciera on topic M19 and spindle-index-enable issues

M19 and spindle-index-enable issues

Category: Advanced Configuration

@scda

The only thing I changed is: uncomment "is_oriented = 0" (otherwise I was not able to run multiple M19 commands in a row).


After digging out my config from back then I notice that I made the same change.

Yes that's the issue with the M19 command. But could probably be changed in a new release ??

thanks for confirming that as I thought I was missing something and yes that could indeed be changed.

What makes me wonder is why  constantly forcing index-enable low does not cause a problem for you.
  • Aciera
  • Aciera's Avatar
18 Mar 2025 13:30 - 18 Mar 2025 13:34
Replied by Aciera on topic M19 and spindle-index-enable issues

M19 and spindle-index-enable issues

Category: Advanced Configuration

@andy, seems I have missed your reply:

The point of IO pins is to only write any state to them when you want to set the state, and let other parts of the net be in charge at other times.


Looking at your code for case 0, which is the initial state, you are setting 'index_enable = 0' so this version of the component permanently forces 'orient.index_enable' low until an orient command is issued (ie 'orient.enable' goes true):
    case 0: // waiting
        index_enable = 0;
        if (enable) {
           if (enable ^ last_enable) {     // positive edge on enable
               is_oriented = 0;
               if (mode & 0x10){
                   index_enable = 1;
                   state = 3;
               } else {
                   state = 1;
               }
           }
        }
        break;

 Your code looks like it will always set index_enable true?


No, my version forces homing to index because the mechanism with adding 16 to the p word does not work and 'orient.index-enable' is not written to unless spindle orientation has been called (ie 'orient.enable' is true) because 'index_enable=0' is now inside the if (enable) { statement.
    switch (state){
    case 0: // waiting
        if (enable) {
        index_enable = 0;
           if (enable ^ last_enable) {     // positive edge on enable
               is_oriented = 0;
               if (1>0){
                   index_enable = 1;
                   state = 3;
               } else {
                   state = 1;
               }
           }
        }
        break;
Displaying 18136 - 18137 out of 18137 results.
Time to create page: 0.400 seconds
Powered by Kunena Forum