Esp_Set_Dio_Porta(Long Data); Esp_Get_Dio_Porta(Long *Data) - Newport ESP6000 User Manual

Motion controller/driver
Table of Contents

Advertisement

esp_set_dio_porta Set Digital I/O Port A
esp_get_dio_porta Report Digital I/O Port A 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_porta(long data)
int esp_get_dio_porta(long *data)
long data
digital I/O Port A
\esp6000.dll
esp_set_dio_porta() writes specified value to digital I/O port A 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.
esp_get_dio_porta() reports DIO port A status. Use function esp_set_portabc_dir()
to define Port A as either an input or output.
Port A DIO signals are externally pulled-up via a 4.7KΩ resister to +5 volts.
Bit-7
PA7
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_A Port */
esp_set_dio_porta(long 0x0FF);
}
esp_get_dio_porta(), esp_set_portabc_dir()
PORT A
Bit-6
Bit-5
Bit-4
Bit-3
PA6
PA5
PA4
PA3
NOTE
Bit-2
Bit-1
Bit-0
PA2
PA1
PA0
5-101

Advertisement

Table of Contents
loading

This manual is also suitable for:

Unidrive6000

Table of Contents