Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: HelloWorld_PLC01A1
VNI8200XP Class Reference
Class representing an VNI8200XP component. More...
#include <VNI8200XP.h>
Inherits PLCOutput.
Public Member Functions | |
| VNI8200XP (PinName output_en, PinName output_ssel, SPI &spi) | |
| Constructor. | |
| virtual | ~VNI8200XP (void) |
| Destructor. | |
| virtual int | init (void *init=NULL) |
| Initializing the component in 1/16 Microstepping mode. | |
| virtual int | read_id (uint8_t *id=NULL) |
| Getting the ID of the component. | |
| virtual void | set_channels (uint8_t Out_array) |
| Set output channels state. | |
| virtual uint8_t | manage_fault (void) |
| Get output fault status. | |
| virtual uint8_t | check_dcdc_status (void) |
| Get DC-DC status of the output channels component. | |
| virtual uint8_t | temperature_warning (void) |
| Get temperature warning status. | |
| virtual uint8_t | check_parity (void) |
| Get parity check status. | |
| virtual uint8_t | check_power_good (void) |
| Get power supply status. | |
| virtual uint8_t | check_comm_error (void) |
| Get parity bits for input data. | |
| virtual void | ssrelay_set_output (uint8_t *outputArray) |
| Set output for output channels component. | |
Protected Member Functions | |
| status_t | ReadWrite (uint8_t *pBufferToRead, uint8_t *pBufferToWrite, uint16_t NumValues) |
| Utility function to read and write data from/to VNI8200XP at the same time. | |
| void | VNI8200XP_Delay (uint32_t delay) |
| Making the CPU wait. | |
| uint8_t | VNI8200XP_SpiWriteBytes (uint8_t *pByteToTransmit, uint8_t *pReceivedByte) |
| Writing and reading bytes to/from the component through the SPI at the same time. | |
Detailed Description
Class representing an VNI8200XP component.
Definition at line 71 of file VNI8200XP.h.
Constructor & Destructor Documentation
| VNI8200XP | ( | PinName | output_en, |
| PinName | output_ssel, | ||
| SPI & | spi | ||
| ) |
Constructor.
- Parameters:
-
out_en pin name of the OUTPUT ENABLE pin used for communication. ssel pin name of the SSEL pin of the SPI device to be used for communication. spi SPI device to be used for communication.
Definition at line 83 of file VNI8200XP.h.
| virtual ~VNI8200XP | ( | void | ) | [virtual] |
Destructor.
Definition at line 98 of file VNI8200XP.h.
Member Function Documentation
| virtual uint8_t check_comm_error | ( | void | ) | [virtual] |
Get parity bits for input data.
- Parameters:
-
None
- Return values:
-
Parity bits
Implements PLCOutput.
Definition at line 208 of file VNI8200XP.h.
| virtual uint8_t check_dcdc_status | ( | void | ) | [virtual] |
Get DC-DC status of the output channels component.
- Parameters:
-
None
- Return values:
-
Feedback status, 1 if OK else 0
Implements PLCOutput.
Definition at line 168 of file VNI8200XP.h.
| virtual uint8_t check_parity | ( | void | ) | [virtual] |
Get parity check status.
- Parameters:
-
None
- Return values:
-
Parity check flag
Implements PLCOutput.
Definition at line 188 of file VNI8200XP.h.
| virtual uint8_t check_power_good | ( | void | ) | [virtual] |
Get power supply status.
- Parameters:
-
None
- Return values:
-
Power good bit, 1 in case of power good
Implements PLCOutput.
Definition at line 198 of file VNI8200XP.h.
| virtual int init | ( | void * | init = NULL ) |
[virtual] |
Initializing the component in 1/16 Microstepping mode.
- Parameters:
-
init Pointer to device specific initalization structure.
- Return values:
-
0 in case of success, an error code otherwise.
Implements Component.
Definition at line 128 of file VNI8200XP.h.
| virtual uint8_t manage_fault | ( | void | ) | [virtual] |
Get output fault status.
- Parameters:
-
None
- Return values:
-
Output channel fault data
Implements PLCOutput.
Definition at line 158 of file VNI8200XP.h.
| virtual int read_id | ( | uint8_t * | id = NULL ) |
[virtual] |
Getting the ID of the component.
- Parameters:
-
id Pointer to an allocated variable to store the ID into.
- Return values:
-
0 in case of success, an error code otherwise.
Implements Component.
Definition at line 138 of file VNI8200XP.h.
| status_t ReadWrite | ( | uint8_t * | pBufferToRead, |
| uint8_t * | pBufferToWrite, | ||
| uint16_t | NumValues | ||
| ) | [protected] |
Utility function to read and write data from/to VNI8200XP at the same time.
- Parameters:
-
[out] pBufferToRead pointer to the buffer to read data into. [in] pBufferToWrite pointer to the buffer of data to send. [in] NumValues number of values to read and write.
- Return values:
-
COMPONENT_OK in case of success, COMPONENT_ERROR otherwise.
Definition at line 273 of file VNI8200XP.h.
| virtual void set_channels | ( | uint8_t | Out_array ) | [virtual] |
Set output channels state.
- Parameters:
-
Output channel data
- Return values:
-
None
Implements PLCOutput.
Definition at line 148 of file VNI8200XP.h.
| virtual void ssrelay_set_output | ( | uint8_t * | outputArray ) | [virtual] |
Set output for output channels component.
- Parameters:
-
TX buffer RX buffer
- Return values:
-
None
Implements PLCOutput.
Definition at line 219 of file VNI8200XP.h.
| virtual uint8_t temperature_warning | ( | void | ) | [virtual] |
Get temperature warning status.
- Parameters:
-
None
- Return values:
-
Temperature warning status, 1 if over temperature
Implements PLCOutput.
Definition at line 178 of file VNI8200XP.h.
| void VNI8200XP_Delay | ( | uint32_t | delay ) | [protected] |
Making the CPU wait.
- Parameters:
-
None.
- Return values:
-
None.
Definition at line 305 of file VNI8200XP.h.
| uint8_t VNI8200XP_SpiWriteBytes | ( | uint8_t * | pByteToTransmit, |
| uint8_t * | pReceivedByte | ||
| ) | [protected] |
Writing and reading bytes to/from the component through the SPI at the same time.
- Parameters:
-
[in] pByteToTransmit pointer to the buffer of data to send. [out] pReceivedByte pointer to the buffer to read data into.
- Return values:
-
0 in case of success, "1" otherwise.
Definition at line 316 of file VNI8200XP.h.
Generated on Fri Jul 15 2022 00:11:30 by
1.7.2
X-NUCLEO-PLC01A1 Programmable Logic Controller