Esp_Set_Dio_Portc(Long Data); Esp_Get_Dio_Portc(Long *Data) - Newport ESP6000 User Manual

Motion controller/driver
Table of Contents

Advertisement

esp_set_dio_portc Write To Digital I/O Port C
esp_get_dio_portc Report Digital I/O Port C Status
Synopsis:
Arguments:
Library Location:
Description:
Returns:
Usage Example:
See Also:
Section 5 — Programming
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
#include "esp6000.h"
int esp_set_dio_portc(long data)
int esp_get_dio_portc(long *data)
long data
digital I/O Port C
\esp6000.dll
esp_set_dio_portc() writes specified value to digital I/O Port C located on both
auxiliary I/O and digital I/O connectors on the controller card.
Port A is an 8-bit port starting from location bit-0 through bit-7.
Use function esp_set_portabc_dir() to define Port C as either an input or output.
esp_get_dio_portc() reports DIO port C status.
Port C DIO signals are externally pulled-up via a 4.7KΩ resister to +5 volts.
Bit-7
PC7
After system reset Ports A, B, and C are automatically configured as inputs.
ESPOK, ESPERROR
Hint:
Define port direction with esp_set_portabc_dir() before using this function. .
#include "esp6000.h"
main()
{
if (!esp_init_system()) exit(-1);
/* Configure Ports A, B, C Directions */
esp_set_portabc_dir(PORT_OUTPUT, PORT_INPUT, PORT_INPUT);
/* Set DIO_C Port */
esp_set_dio_portc(long 0x0FF);
}
esp_get_dio_porta(), esp_get_dio_portb(), esp_set_portabc_dir()
PORT C
Bit-6
Bit-5
Bit-4
Bit-3
PC6
PC5
PC4
PC3
NOTE
Bit-2
Bit-1
Bit-0
PC2
PC1
PC0
5-103

Advertisement

Table of Contents
loading

This manual is also suitable for:

Unidrive6000

Table of Contents