|
|
| (22 intermediate revisions by 3 users not shown) |
| Line 16: |
Line 16: |
|
| |
|
| ==Detailed description== | | ==Detailed description== |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
|
| |
|
| ''No detailed description exists yet for this component'' | | ''No detailed description exists yet for this component'' |
| Line 22: |
Line 44: |
|
| |
|
|
| |
|
| Simple example showing how to drive the motor components and how to create sub assemblies attached to the motor output shafts in the simulation panels.
| |
| {{Fcfile|Motors.fcfx|Motors}}
| |
|
| |
|
| ==Downloadable macro reference==
| |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Coast'''
| |
| |-
| |
| | colspan="2" | Turn off power to the motor by setting the pins according to the 'Coast Pattern' property.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Break'''
| |
| |-
| |
| | colspan="2" | Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Disable'''
| |
| |-
| |
| | colspan="2" | Disable the motor output
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Forwards'''
| |
| |-
| |
| | colspan="2" | Set the motor turning in the forwards direction by setting the pins according to the 'Reverse Pattern' property.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Duty
| |
| |-
| |
| | colspan="2" | Sets the motor power for PWM or H-Bridge outputs
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Enable'''
| |
| |-
| |
| | colspan="2" | Enables the motor output
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Reverse'''
| |
| |-
| |
| | colspan="2" | Set the motor turning in the reverse direction by setting the pins according to the 'Reverse Pattern' property.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Duty
| |
| |-
| |
| | colspan="2" | Sets the motor power for PWM or H-Bridge outputs
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Forward'''
| |
| |-
| |
| | colspan="2" | Drives both motors of the formula flowcode forwards with the power specified.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Power
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadLineSensor'''
| |
| |-
| |
| | colspan="2" | Returns the digital value from the line sensor specified.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Sensor
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SpinRight'''
| |
| |-
| |
| | colspan="2" | Spins the formula flowcode on the spot in a clockwise direction as seen from above.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Power
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckIR'''
| |
| |-
| |
| | colspan="2" | Checks to see if a IR sensor is within the master threshold distance.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Sensor
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ''<span style="color:red;">No additional examples</span>'' |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadIRSensor'''
| |
| |-
| |
| | colspan="2" | Reads the analogue value from the specified IR distance sensor.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Sensor
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| | ==Macro reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Break=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMotors''' | | | width="90%" class="mtx-class-macrohead" | '''Break''' |
| |- | | |- |
| | colspan="2" | Sets the speed and direction of the Formula Flowcode motors. | | | colspan="2" | Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:]] -
| |
| | width="90%" | Left_Power
| |
| |- | | |- |
| | colspan="2" | Valid Range = -255 to 255
| |
| |-
| |
| | width="10%" align="center" | [[File:]] -
| |
| | width="90%" | Right_Power
| |
| |-
| |
| | colspan="2" | Valid Range = -255 to 255
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 228: |
Line 84: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Coast=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Reverse''' | | | width="90%" class="mtx-class-macrohead" | '''Coast''' |
| |- | | |- |
| | colspan="2" | Drives both motors of the formula flowcode backwards with the power specified. | | | colspan="2" | Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. |
| |- | | |- |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Power
| |
| |-
| |
| | colspan="2" |
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 246: |
Line 98: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Disable=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WaitForSwitch''' | | | width="90%" class="mtx-class-macrohead" | '''Disable''' |
| |- | | |- |
| | colspan="2" | Waits for the specified switch to be pressed. | | | colspan="2" | Disable the motor output |
| |- | | |- |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Switch
| |
| |-
| |
| | colspan="2" |
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 264: |
Line 112: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Enable=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadLDR''' | | | width="90%" class="mtx-class-macrohead" | '''Enable''' |
| |- | | |- |
| | colspan="2" | Reads the current audio signal level from the on-board light sensor. | | | colspan="2" | Enables the motor output |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Forwards=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteLEDs''' | | | width="90%" class="mtx-class-macrohead" | '''Forwards''' |
| |- | | |- |
| | colspan="2" | Allows control of all 8-LEDs on the front of the Formula Flowcode. | | | colspan="2" | Set the motor turning in the forwards direction by setting the pins according to the 'Reverse Pattern' property. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" | LED_Byte | | | width="90%" | Duty |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | Sets the motor power for PWM or H-Bridge outputs |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 295: |
Line 145: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Reverse=== |
| | {| class="mtx-class-macrotable wikitable" |
| | |- |
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | | width="90%" class="mtx-class-macrohead" | '''Reverse''' |
| | |- |
| | | colspan="2" | Set the motor turning in the reverse direction by setting the pins according to the 'Reverse Pattern' property. |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| |
| |- | | |- |
| | colspan="2" | Starts up the formula flowcode PWM for motor control and performs the wait for button press | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | | width="90%" | Duty |
| |- | | |- |
| | | colspan="2" | Sets the motor power for PWM or H-Bridge outputs |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
| |
|
| |
|
|
| |
|
| ==Property reference== | | ==Property reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="mtx-class-macrotable wikitable" |
| | |- |
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] |
| | | width="90%" class="mtx-class-macrohead" | '''Properties''' |
| | |- |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | | width="90%" class="mtx-class-propfolder" | Control Type |
| |- | | |- |
| |- | | |- |
| Line 333: |
Line 191: |
| | colspan="2" | Decides how the motor outputs are enabled. | | | colspan="2" | Decides how the motor outputs are enabled. |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" | Channel | | | width="90%" class="mtx-class-propfolder" | Connections |
| |-
| |
| | colspan="2" | PWM Channel selector
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Alt Pin Enable
| |
| |- | | |- |
| | colspan="2" | Alternative Pin Enable (if available on target device)
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] |
| | width="90%" | Port | | | width="90%" | PinA |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | First control pin - set 'pattern' properties below to set the pin's function. |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Remap Pin
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| |
| | width="90%" | Period Register
| |
| |-
| |
| | colspan="2" | PWM Period Register value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Prescaler Divide
| |
| |-
| |
| | colspan="2" | Prescaler Divider value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | PWM Timer
| |
| |-
| |
| | colspan="2" | Timer associated with PWM to drive the output. Warning - All PWM channels linked to the same timer will share the same period and prescaler settings.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Frequency (KHz)
| |
| |-
| |
| | colspan="2" |
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] |
| | width="90%" | Direction Pin | | | width="90%" | PinB |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | Second control pin - set 'pattern' properties below to set the pin's function. |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
| | width="90%" | Channel | | | width="90%" | Forwards Pattern |
| |- | | |- |
| | colspan="2" | PWM Channel selector | | | colspan="2" | The state of pins A and B required to drive the motor in a forwards direction. |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
| | width="90%" | Polarity | | | width="90%" | Reverse Pattern |
| |- | | |- |
| | colspan="2" | Selects the active output voltage. Active high - Pins will be low when inactive and high when active. Active Low- Pins will be high when inactive and low when active. | | | colspan="2" | States of pins A and B required to drive the motor in a reverse direction. |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
| | width="90%" | Timer | | | width="90%" | Coast Pattern |
| |- | | |- |
| | colspan="2" | Timer associated with PWM to drive the output. Warning - All PWM channels linked to the same timer will share the same period and prescaler settings. | | | colspan="2" | States of pins A and B required to stop the motor. |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
| | width="90%" | Prescaler Divide | | | width="90%" | Brake Pattern |
| |- | | |- |
| | colspan="2" | Prescaler Divider value | | | colspan="2" | States of pins A and B required to stop the motor. |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| |
| | width="90%" | Period Register
| |
| |-
| |
| | colspan="2" | PWM Period Register value
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | A Pin
| |
| |- | | |- |
| | colspan="2" | Output Pin A | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | | width="90%" class="mtx-class-propfolder" | Simulation Settings |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | B Pin
| |
| |-
| |
| | colspan="2" | Output Pin B
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | C Pin
| |
| |-
| |
| | colspan="2" | Output Pin C
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | D Pin
| |
| |-
| |
| | colspan="2" | Output Pin D
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | A Remap Pin
| |
| |-
| |
| | colspan="2" | Remap Pin A - Specifies the pin used for the A output. Only available on devices supporting remappable hardware pins.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | B Remap Pin
| |
| |-
| |
| | colspan="2" | Remap Pin B - Specifies the pin used for the B output. Only available on devices supporting remappable hardware pins.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | C Remap Pin
| |
| |-
| |
| | colspan="2" | Remap Pin C - Specifies the pin used for the C output. Only available on devices supporting remappable hardware pins.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | D Remap Pin
| |
| |-
| |
| | colspan="2" | Remap Pin D - Specifies the pin used for the D output. Only available on devices supporting remappable hardware pins.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| |
| | width="90%" | Frequency (KHz)
| |
| |-
| |
| | colspan="2" | Calculated PWM output frequency in KHz.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Rising Bits
| |
| |-
| |
| | colspan="2" | Number of bits assigned to the rising edge dead band counter. Auto populated based on selected target chip.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Falling Bits
| |
| |-
| |
| | colspan="2" | Number of bits assigned to the falling edge dead band counter. Auto populated based on selected target chip.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Rising Count
| |
| |-
| |
| | colspan="2" | Number of cycles to wait after a falling edge and before a rising edge.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Falling Count
| |
| |-
| |
| | colspan="2" | Number of cycles to wait after a rising edge and before a falling edge.
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] |
| Line 492: |
Line 253: |
| |- | | |- |
| | colspan="2" | Which way the motor will rotate when the 'forwards' command is sent. | | | colspan="2" | Which way the motor will rotate when the 'forwards' command is sent. |
| | |- |
| | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | | width="90%" class="mtx-class-propfolder" | Linkage |
| | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-type-17-icon.png]] | | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]] |
| Line 497: |
Line 262: |
| |- | | |- |
| | colspan="2" | An object or group to link the motor to - the object will move along with the motor. | | | colspan="2" | An object or group to link the motor to - the object will move along with the motor. |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | PinA
| |
| |-
| |
| | colspan="2" | First control pin - set 'pattern' properties below to set the pin's function.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Forwards Pattern
| |
| |-
| |
| | colspan="2" | The state of pins A and B required to drive the motor in a forwards direction.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Reverse Pattern
| |
| |-
| |
| | colspan="2" | States of pins A and B required to drive the motor in a reverse direction.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Coast Pattern
| |
| |-
| |
| | colspan="2" | States of pins A and B required to stop the motor.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Brake Pattern
| |
| |-
| |
| | colspan="2" | States of pins A and B required to stop the motor.
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
| |
| |-
| |
| |} | | |} |
| | |
| | ==Component Source Code== |
| | |
| | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Motor_with_reverse.fcfx FC_Comp_Source_Motor_with_reverse.fcfx] |
| | |
| | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Motor_with_reverse.fcfx FC_Comp_Source_Motor_with_reverse.fcfx] |