Jump to content

Software Error > BrickletSilentStepperV2.setCoolstepConfiguration > Javascript API ?


Recommended Posts

Posted
Hallo!
Beim Einsatz von "BrickletSilentStepperV2.setCoolstepConfiguration" zeigt sich bei der Parameter Übergabe von negativen Werten für das Argument "stallguardThresholdValue" ein unerwartetetes Ergebnis. 
 
Der Wertebereich des Parameters stallguardThresholdValue liegt nach Dokumentation zwischen -64 und 63.
Werte zwischen -64 und -1 werden falsch interpretiert
Die Abfrage mit getCoolstepConfiguration zeigt:
-1 ergibt 127
-2 ergibt 126
...
-64 ergibt 64
 
Im BrickV User Interface werden für negative Werte immer "63" angezeigt (siehe Anhang)
 
Die Übergabe schreibe ich zB. dabei so:
ss.setCoolstepConfiguration(2, 10, 0, 0, 0, -20, 1)
(Bold = stallguardThresholdValue)
 
Ist das ein Fehler in der JS API?
Oder mache ich etwas falsch?
 
Die offizielle Doku dazu:
https://www.tinkerforge.com/de/doc/Software/Bricklets/SilentStepperV2_Bricklet_JavaScript.html#silent-stepper-v2-bricklet-javascript-api
BrickletSilentStepperV2.setCoolstepConfiguration(minimumStallguardValue, maximumStallguardValue, currentUpStepWidth, currentDownStepWidth, minimumCurrent, stallguardThresholdValue, stallguardMode[, returnCallback][, errorCallback])
 
 
Danke im Voraus für Eure Rückmeldungen!
step_
 

Bildschirmfoto 2021-08-13 um 11.25.19.png

Posted

Update:

Das Debug Log zeigt dazu diesen Fehler an.

2021-08-13 12:33:15 - CRITICAL - [Job:CSV-Writer] 'ascii' codec can't encode character '\xb0' in position 63: ordinal not in range(128)

Posted

Data Logger Config:

{
  "data": {
    "csv": {
      "enabled": false,
      "file_name": "/logger_data_1628837611.csv"
    },
    "time_format": "de",
    "time_format_strftime": "%Y%m%d_%H%M%S"
  },
  "debug": {
    "log": {
      "enabled": false,
      "file_name": "/logger_debug_1628837611.log",
      "level": "debug"
    },
    "time_format": "de"
  },
  "devices": [
    {
      "host": "default",
      "name": "Silent Stepper Bricklet 2.0",
      "uid": "Uxi",
      "values": {
        "Chip Temperature": {
          "interval": 1
        },
        "Current Consumption": {
          "interval": 1
        },
        "Current Position": {
          "interval": 1
        },
        "Current Velocity": {
          "interval": 1
        },
        "Input Voltage": {
          "interval": 1
        }
      }
    },
    {
      "host": "default",
      "name": "Servo Bricklet 2.0",
      "uid": "SF6",
      "values": {
        "Chip Temperature": {
          "interval": 1
        },
        "Input Voltage": {
          "interval": 1
        },
        "Overall Current": {
          "interval": 1
        },
        "Servo Current (Servo 0)": {
          "interval": 1
        },
        "Servo Current (Servo 1)": {
          "interval": 0
        },
        "Servo Current (Servo 2)": {
          "interval": 0
        },
        "Servo Current (Servo 3)": {
          "interval": 7
        },
        "Servo Current (Servo 4)": {
          "interval": 3
        },
        "Servo Current (Servo 5)": {
          "interval": 0
        },
        "Servo Current (Servo 6)": {
          "interval": 6
        },
        "Servo Current (Servo 7)": {
          "interval": 0
        },
        "Servo Current (Servo 8)": {
          "interval": 0
        },
        "Servo Current (Servo 9)": {
          "interval": 0
        }
      }
    },
    {
      "host": "default",
      "name": "HAT Brick",
      "uid": "UDo",
      "values": {
        "Voltages": {
          "interval": 0,
          "subvalues": {
            "DC Voltage": true,
            "USB Voltage": true
          }
        }
      }
    },
    {
      "host": "default",
      "name": "Hall Effect Bricklet 2.0",
      "options": {
        " Debounce": {
          "value": 100000
        },
        "High Threshold": {
          "value": 2000
        },
        "Low Threshold": {
          "value": -2000
        }
      },
      "uid": "K9t",
      "values": {
        "Count": {
          "interval": 0
        },
        "Value": {
          "interval": 0
        }
      }
    }
  ],
  "hosts": {
    "default": {
      "name": "vogelautomat",
      "port": 4223,
      "secret": null
    }
  }
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...