Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Technic Medium Angular Motor Grey (mindstorms set 51515) #110

Merged
merged 1 commit into from
Oct 26, 2020

Conversation

rickjansen-dev
Copy link
Contributor

added this motor, it does however behave differently compared to the large technic angular motor, GotoRealZeroAsync() does something different (it stays in the same spot, you can hear the motor whine slightly though, unsure if it is unable to move because power is too low or that it is actually not moving because it is in the 'correct' spot already)
see also #75

@tthiery tthiery added area-device-motor enhancement New feature or request labels Oct 16, 2020
@tthiery tthiery added this to the v3.2 (non-breaking) milestone Oct 16, 2020
@tthiery
Copy link
Member

tthiery commented Oct 16, 2020

Can you add here an output of the poweredup device list -p <whatever> for the TechnicMediumAngularMotor. These allow me to do some analysis without having the actual records (or otherwise build a tool to decompile the StaticPortData ;))

@rickjansen-dev
Copy link
Contributor Author

rickjansen-dev commented Oct 16, 2020

device list output for good measure:

Selected TechnicMediumHub with key 1
Discover Ports. Receiving Messages ...
........................................................................................................................................................................
Discover Ports Function: 167 / 167
Hub: 0
  Port: 1
    IOTypeId: TechnicMediumAngularMotorGrey
    HardwareRevision: 0.0.0.4
    SoftwareRevision: 1.0.0.0
    OutputCapability: True
    InputCapability: True
    LogicalCombinableCapability: True
    LogicalSynchronizableCapability: True
    ModeCombinations: [0000000000001110]
    UsedCombinationIndex: 0
    MultiUpdateEnabled: False
    ConfiguredModeDataSetIndex: []
    Mode: 0
      Name: POWER
      IsInput: False
      IsOutput: True
      RawMin: -100
      RawMax: 100
      PctMin: -100
      PctMax: 100
      SIMin: -100
      SIMax: 100
      Symbol: PCT
      InputSupportsNull: False
      InputSupportFunctionalMapping20: False
      InputAbsolute: False
      InputRelative: False
      InputDiscrete: False
      OutputSupportsNull: False
      OutputSupportFunctionalMapping20: True
      OutputAbsolute: True
      OutputRelative: False
      OutputDiscrete: False
      NumberOfDatasets: 1
      DatasetType: SByte
      TotalFigures: 4
      Decimals: 0
      DeltaInterval: 0
      NotificationEnabled: False
    Mode: 1
      Name: SPEED
      IsInput: True
      IsOutput: True
      RawMin: -100
      RawMax: 100
      PctMin: -100
      PctMax: 100
      SIMin: -100
      SIMax: 100
      Symbol: PCT
      InputSupportsNull: False
      InputSupportFunctionalMapping20: False
      InputAbsolute: True
      InputRelative: False
      InputDiscrete: False
      OutputSupportsNull: False
      OutputSupportFunctionalMapping20: True
      OutputAbsolute: True
      OutputRelative: False
      OutputDiscrete: False
      NumberOfDatasets: 1
      DatasetType: SByte
      TotalFigures: 4
      Decimals: 0
      DeltaInterval: 0
      NotificationEnabled: False
    Mode: 2
      Name: POS
      IsInput: True
      IsOutput: True
      RawMin: -360
      RawMax: 360
      PctMin: -100
      PctMax: 100
      SIMin: -360
      SIMax: 360
      Symbol: DEG
      InputSupportsNull: False
      InputSupportFunctionalMapping20: False
      InputAbsolute: False
      InputRelative: True
      InputDiscrete: False
      OutputSupportsNull: False
      OutputSupportFunctionalMapping20: True
      OutputAbsolute: False
      OutputRelative: True
      OutputDiscrete: False
      NumberOfDatasets: 1
      DatasetType: Int32
      TotalFigures: 11
      Decimals: 0
      DeltaInterval: 0
      NotificationEnabled: False
    Mode: 3
      Name: APOS
      IsInput: True
      IsOutput: True
      RawMin: -180
      RawMax: 179
      PctMin: -200
      PctMax: 200
      SIMin: -180
      SIMax: 179
      Symbol: DEG
      InputSupportsNull: False
      InputSupportFunctionalMapping20: False
      InputAbsolute: True
      InputRelative: False
      InputDiscrete: False
      OutputSupportsNull: False
      OutputSupportFunctionalMapping20: True
      OutputAbsolute: True
      OutputRelative: False
      OutputDiscrete: False
      NumberOfDatasets: 1
      DatasetType: Int16
      TotalFigures: 3
      Decimals: 0
      DeltaInterval: 0
      NotificationEnabled: False
    Mode: 4
      Name: CALIB
      IsInput: False
      IsOutput: False
      RawMin: 0
      RawMax: 3600
      PctMin: 0
      PctMax: 100
      SIMin: 0
      SIMax: 3600
      Symbol: CAL
      InputSupportsNull: False
      InputSupportFunctionalMapping20: False
      InputAbsolute: False
      InputRelative: False
      InputDiscrete: False
      OutputSupportsNull: False
      OutputSupportFunctionalMapping20: False
      OutputAbsolute: False
      OutputRelative: False
      OutputDiscrete: False
      NumberOfDatasets: 2
      DatasetType: Int16
      TotalFigures: 5
      Decimals: 0
      DeltaInterval: 0
      NotificationEnabled: False
    Mode: 5
      Name: STATS
      IsInput: False
      IsOutput: False
      RawMin: 0
      RawMax: 65535
      PctMin: 0
      PctMax: 100
      SIMin: 0
      SIMax: 65535
      Symbol: MIN
      InputSupportsNull: False
      InputSupportFunctionalMapping20: False
      InputAbsolute: False
      InputRelative: False
      InputDiscrete: False
      OutputSupportsNull: False
      OutputSupportFunctionalMapping20: False
      OutputAbsolute: False
      OutputRelative: False
      OutputDiscrete: False
      NumberOfDatasets: 14
      DatasetType: Int16
      TotalFigures: 5
      Decimals: 0
      DeltaInterval: 0
      NotificationEnabled: False

@tthiery
Copy link
Member

tthiery commented Oct 16, 2020

Mmmh ... Do not like that. Have you tried the test pattern once or multiple times? Try to check out if GotoRealZero is a stable function from its implementation perspective.

@rickjansen-dev
Copy link
Contributor Author

I tested this a couple of times.. I'll do some more testing side-by-side, executing the same things on both devices on a single hub.
I'll look into GotoRealZero if I have some time.

@rickjansen-dev
Copy link
Contributor Author

I investigated this, and the low speed (5) is the cause of the GotoRealZero not working. If I changed this to 10, it works, and returns to the marked position correctly. At 5 it does not move at all (whereas the technic large angular motor does)

Now simply changing the speed to 10 works, but maybe this (or a minimum speed value) should be parameterized so different absolutemotor's can a specific minimum required to actually move the motor. What do you think @tthiery ?

@tthiery
Copy link
Member

tthiery commented Oct 26, 2020

Awesome investigation. Thanks.

I will merge this.

Regards the minimum speed: File a issue. Let us park this. Enough stuff to finish up right now.

@tthiery tthiery merged commit 261f44b into sharpbrick:master Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-device-motor enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants