Jump to content

Component: Brushless Motor (Standard) ()

From Flowcode Help
Revision as of 21:03, 16 November 2021 by Wiki bot (talk | contribs) (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix Ltd |- | width="20%" style="color:gray;" | Version | 1.1 |- | width="20%" style="color:gray...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Author Matrix Ltd
Version 1.1
Category


Brushless Motor (Standard) component

A small brushless motor component designed to be driven from a three phase ESC. The ESC would be driven using the Servo Motor Controller component.

Detailed description

No detailed description exists yet for this component

Examples

3 x 4 Keypad Schematic

Example schematic of a 3 x 4 Keypad.


Multi Digit Number Entry

A simple example to take in a decimal number (0-65535) from the user and then use this number as a delay for flashing a LED on and off. Shows the principals of reading the keypad and building up a multi-digit number.

Keypad Delay


Keypad Based Door Entry System

Each key press on the keypad is fed into the Circular Buffer component. We then poll the buffer to see if the correct characters for the password have been entered.

Keypad Door Entry

If the correct sequence is detected then we activate the solenoid component for 5 seconds.

Downloadable macro reference

FT_Write
Write data to the device.  
[[File:]] - Handle
Handle of the device. 
- BYTE Buffer
Pointer to the buffer that contains the data to be written to the device. 
- ULONG Bytes
Number of bytes to write to the device. 
- ULONG Count
Pointer to a variable of type DWORD which receives the number of bytes written to the device. 
- BYTE Return


FT_Read
Read data from the device.  
[[File:]] - Handle
Handle of the device. 
- BYTE Buffer
Pointer to the buffer that receives the data from the device. 
- ULONG Bytes
Number of bytes to be read from the device. 
- ULONG Count
Pointer to a variable of type DWORD which receives the number of bytes read from the device. 
- BYTE Return


FT_SetFlowControl
This function sets the flow control for the device. 
[[File:]] - Handle
Handle of the device. 
- UINT FlowControl
Flow setting 0=None, 0x0100=RTS/CTS, 0x0200=DTR/DSR, 0x0400=XON/XOFF 
- BYTE Xon
Character used to signal Xon. Only used if flow control is Xon/Xoff 
- BYTE Xoff
Character used to signal Xoff. Only used if flow control is Xon/Xoff 
- BYTE Return


FT_GetModemStatus
Gets the modem status and line status from the device.  
[[File:]] - Handle
Handle of the device. 
[[File:]] - ModemStatus
Pointer to a variable of type DWORD which receives the modem status and line status from the device. 
- BYTE Return


FT_SetBreakOn
Sets the BREAK condition for the device.  
[[File:]] - Handle
Handle of the device. 
- BYTE Return


FT_CreateDeviceInfoList
This function builds a device information list and returns the number of D2XX devices connected to the system. The list contains information about both unopen and open devices.  
[[File:]] - DevCount
Unsigned long array used to store the number of devices connected 
- BYTE Return


FT_SetTimeouts
This function sets the read and write timeouts for the device. 
[[File:]] - Handle
Handle of the device. 
[[File:]] - ReadTimeout
Read timeout in milliseconds. 
[[File:]] - WriteTimeout
Write timeout in milliseconds. 
- BYTE Return


FT_SetBitMode
Enables different chip modes. 
[[File:]] - Handle
Handle of the device. 
- BYTE Mask
Required value for bit mode mask. This sets up which bits are inputs and outputs. A bit value of 0 sets the corresponding pin to an input, a bit value of 1 sets the corresponding pin to an output. 
- BYTE Mode
0=Reset / 1=AsyncBB / 2=MPSSE / 4=SyncBB / 8=MCUHost / 16=FastOpto / 32=CBUS / 64=SyncFIFO 
- BYTE Return


FT_SetRts
This function sets the Request To Send (RTS) control signal. 
[[File:]] - Handle
Handle of the device. 
- BYTE Return


FT_GetDeviceInfoDetail
This function returns an entry from the device information list. 
- ULONG Index
Index of the entry in the device info list. 
- ULONG Flags
Pointer to unsigned long to store the flag value. 
- ULONG Type
Pointer to unsigned long to store device type. 
- ULONG ID
Pointer to unsigned long to store device ID. 
- ULONG LocID
Pointer to unsigned long to store the device location ID. 
- BYTE SerNum
Pointer to buffer to store device serial number as a null terminated string 
- BYTE Descript
Pointer to buffer to store device description as a null-terminated string 
[[File:]] - TempHandle
Pointer to a variable of type FT_HANDLE where the handle will be stored 
- BYTE Return


FT_Close
Close an open device. 
[[File:]] - Handle
Handle of the device. 
- BYTE Return


FT_ClrDtr
This function clears the Data Terminal Ready (DTR) control signal. 
[[File:]] - Handle
Handle of the device. 
- BYTE Return


FT_Purge
This function purges receive and transmit buffers in the device. 
[[File:]] - Handle
Handle of the device. 
[[File:]] - Mask
Used to determine which buffer to purge, 1=Rx / 2=Tx / 3=Both 
- BYTE Return


FT_GetQueueStatus
Gets the number of bytes in the receive queue. 
[[File:]] - Handle
Handle of the device. 
[[File:]] - RxQueueLength
Pointer to a variable of type DWORD which receives the number of bytes in the receive queue. 
- BYTE Return


FT_SetDataCharacteristics
This function sets the data characteristics for the device.  
[[File:]] - Handle
Handle of the device. 
- BYTE WordLength
Number of bits per word - Must be 7 or 8 
- BYTE StopBits
Number of stop bits - Must be 1 or 2 
- BYTE Parity
Parity 0=None / 1=Odd / 2=Even / 3=Mark / 4=Space 
- BYTE Return


FT_SetBreakOff
Resets the BREAK condition for the device.  
[[File:]] - Handle
Handle of the device. 
- BYTE Return


FT_SetDivisor
This function sets the baud rate for the device. It is used to set non-standard baud rates.  
[[File:]] - Handle
Handle of the device. 
- UINT Divisor
Divisor. 
- BYTE Return


FT_SetBaudRate
This function sets the baud rate for the device.  
[[File:]] - Handle
Handle of the device. 
- ULONG BaudRate
Baud rate. 
- BYTE Return


FT_SetDtr
This function sets the Data Terminal Ready (DTR) control signal. 
[[File:]] - Handle
Handle of the device. 
- BYTE Return


FT_Open
Open the device and return a handle which will be used for subsequent accesses. 
[[File:]] - Device
Index of the device to open. Indices are 0 based. 
[[File:]] - ft_Handle
Pointer to a variable of type FT_HANDLE where the handle will be stored. This handle must be used to access the device. 
- BYTE Return


ScanFor232
Scans for a FTDI D2XX device, returnes true if at least one device was found. 
[[File:]] - Return


FT_ResetDevice
This function sends a reset command to the device.  
[[File:]] - Handle
Handle of the device. 
- BYTE Return


FT_SetChars
This function sets the special characters for the device. 
[[File:]] - Handle
Handle of the device. 
- BYTE EventCh
Event character. 
- BYTE EventChEn
0 if event character disabled, non-zero otherwise. 
- BYTE ErrorCh
Error character. 
- BYTE ErrorChEn
0 if error character disabled, non-zero otherwise. 
- BYTE Return



Property reference

Properties
ESC Type
Selects if the ESC is capable of operating the motor in one or two directions. A R/C car ESC would likely be Bi-Directional whereas a helicopter ESC would be Uni-Directional. 
Link To...
Select a panel object here to connect it 'mechanically' to the servo's actuator. The selected object will now be moved whenever the servo position changes. NB) To move multiple objects, first group the objects, and then select the group. 
Reverse Output
Some manufacturers motors may rotate in different ways to others. Changing this property allows you to flip the direction of the simulated motor to better match with the real world hardware. 
Connections
Simulations