ADLINK Technology NEON-2000-JNX Series User manual

NEON-2000-JNX Series
DI/O Function Library Reference
Manual Rev.: 1.1
Revision Date: July 15, 2021
Part No: 50M-00006-1010

ii
Revision History
Revision Release Date Description of Change(s)
1.0 2021-04-07 Initial release
1.1 2021-07-15 Remove Neon_GetDOState function;
update Neon SDK installation info.

Preface iii
NEON-2000-JNX FLR
Preface
Copyright © 2021 ADLINK Technology, Inc.
This document contains proprietary information protected by copy-
right. All rights are reserved. No part of this manual may be repro-
duced by any mechanical, electronic, or other means in any form
without prior written permission of the manufacturer.
Disclaimer
The information in this document is subject to change without prior
notice in order to improve reliability, design, and function and does
not represent a commitment on the part of the manufacturer.
In no event will the manufacturer be liable for direct, indirect, spe-
cial, incidental, or consequential damages arising out of the use or
inability to use the product or documentation, even if advised of
the possibility of such damages.
Environmental Responsibility
ADLINK is committed to fulfill its social responsibility to global
environmental preservation through compliance with the Euro-
pean Union's Restriction of Hazardous Substances (RoHS) direc-
tive and Waste Electrical and Electronic Equipment (WEEE)
directive. Environmental protection is a top priority for ADLINK.
We have enforced measures to ensure that our products, manu-
facturing processes, components, and raw materials have as little
impact on the environment as possible. When products are at their
end of life, our customers are encouraged to dispose of them in
accordance with the product disposal and/or recovery programs
prescribed by their nation or company.
Trademarks
Product names mentioned herein are used for identification pur-
poses only and may be trademarks and/or registered trademarks
of their respective companies.

iv Preface
Conventions
Take note of the following conventions used throughout this
manual to make sure that users perform certain tasks and
instructions properly.
NOTE:
NOTE:
Additional information, aids, and tips that help users perform
tasks.
CAUTION:
Information to prevent minor physical injury, component dam-
age, data loss, and/or program corruption when trying to com-
plete a task.
WARNING:
Information to prevent serious physical injury, component
damage, data loss, and/or program corruption when trying to
complete a specific task.

Table of Contents v
NEON-2000-JNX FLR
Table of Contents
Revision History...................................................................... ii
Preface.................................................................................... iii
1 Introduction ........................................................................ 1
1.1 Setting Up the Neon SDK .................................................... 1
2 Function Library................................................................. 3
2.1 List of Functions................................................................... 3
2.2 Function Library ................................................................... 4
2.2.1 Device Control Function ............................................. 4
2.2.2 DIO Functions............................................................. 5
Important Safety Instructions.............................................. 19
Getting Service...................................................................... 23

vi Table of Contents
This page intentionally left blank.

Introduction 1
NEON-2000-JNX FLR
1 Introduction
The NEON-2000-JNX Function Library Reference provides neces-
sary API details for functions that can used to develop applications
in C/C++. When the NEON-2000-JNX driver is installed, functions
can be directly called with the Neon SDK (the driver is pre-
installed at the factory).
Example:
#include "Neon.h"
using namespace std;
char buffer[256];
if (Neon_GetDeviceInfo(buffer, sizeof
(buffer)) != COMMON_ERROR) cout << buffer
<< endl;
...
For more examples, refer to the sample code.
1.1 Setting Up the Neon SDK
If users need to update or re-install the Neon SDK, please go to
the NEON-2000-JNX product page at www.adlinktech.com and
download the driver package.
Use the following steps to set up the Neon SDK.
1. Install the Neon SDK:
sudo dpkg -i NeonSDK.deb
2. Set the file paths:
Zlibraries at /usr/lib/Neon
Zheaders at /usr/include/Neon/Neon.h
Zsamples at /usr/src/Neon/Sample
3. Build Neon_Information Sample:
#cd /usr/src/Neon/Sample/Neon_Information
#make

2Introduction
4. Build Neon_Setting Sample:
#cd /usr/src/Neon/Sample/Neon_Setting
#make
5. Build Neon_ListenTrigger Sample:
#cd /usr/src/Neon/Sample/Neon_ListenTrigger
#make
6. Run Neon_Information Sample:
#cd /usr/src/Neon/Sample/Neon_Information
#sudo ./NeonInformation
7. Neon_Setting Help:
Execute the application with no parameters.
#cd /usr/src/Neon/Sample/Neon_Setting
#sudo ./NeonSet
8. Neon_ListenTrigger Sample:
The program will receive a trigger event via a callback function.
Use <Ctrl>+<c> to terminate this program.
#cd /usr/src/Neon/Sample/Neon_ListenTrigger
#sudo ./NeonListenTrigger
9. Run Neon_Python Sample:
#cd /usr/src/Neon/Sample/Neon_Python
#sudo python3 Neon.py

Function Library 3
NEON-2000-JNX FLR
2 Function Library
2.1 List of Functions
Category Function
Device Control Neon_GetDeviceInfo
DIO
Neon_GetDINums
Neon_GetDONums
Neon_SetDOState
Neon_GetDIState
Neon_SetDIO0Config
Neon_GetDIO0Config
Neon_SetDITriggerPolarity
Neon_GetDITriggerPolarity
Neon_SetDITriggerCallback
Neon_SetStrobeOutEnable
Neon_GetStrobeOutEnable
Neon_SetStrobeOutDelay
Neon_GetStrobeOutDelay
Neon_SetStrobeOutPulseWidth
Neon_GetStrobeOutPulseWidth
Neon_SetExposureDelay
Neon_GetExposureDelay
Neon_SetDebounceTime
Neon_GetDebounceTime
Neon_SetStrobeOutInvertedPolarity
Neon_GetStrobeOutInvertedPolarity

4 Function Library
2.2 Function Library
2.2.1 Device Control Function
Neon_GetDeviceInfo
Retrieves device information.
Syntax
C/C++
int Neon_GetDeviceInfo (char* sVersion, int
iSize)
Parameter(s)
sVersion:
An allocated buffer must be assigned to read the device
version. The device information format is:
[Device1 Name]:[Version]
[Device2 Name]:[Version]
…
Each device description is separated by a break line
character ‘\n’
iSize:
The number of “sVersion” bytes. The suggested size is 256.
Return Code
Returns true if successful, otherwise COMMON_ERROR.

Function Library 5
NEON-2000-JNX FLR
2.2.2 DIO Functions
Neon_GetDINums
Retrieves the number of DIs.
Syntax
C/C++
int Neon_GetDINums (unsigned int* iCounts)
Parameter(s)
iCounts:
Returns the number of DIs.
Return Code
Returns true if successful, otherwise returns
COMMON_ERROR.
Neon_GetDONums
Retrieves the number of DOs.
Syntax
C/C++
int Neon_GetDONums (unsigned int* iCounts)
Parameter(s)
iCounts:
Returns the number of DOs.
Return Code
Returns true if successful, otherwise COMMON_ERROR.

6 Function Library
Neon_SetDOState
Turns DO on or off.
Syntax
C/C++
int Neon_SetDOState (unsigned int iIndex, int
iState)
Parameter(s)
iIndex:
Sets the Index of the DO; zero-based.
iState:
Sets the state of the DO: 1 is on, 0 is off.
e.g. Neon_SetDOState (1,1) -> Sets DO channel 1 to on
Return Code
Returns true if successful, otherwise COMMON_ERROR.
Neon_GetDIState
Gets the DI’s state.
Syntax
C/C++
int Neon_GetDIState (unsigned int iIndex, int*
iState)
Parameter(s)
iIndex:
Sets the Index of the DI; zero-based.
iState:
Gets the state of the DI: 1 is on, 0 is off.
Return Code
Returns true if successful, otherwise COMMON_ERROR.

Function Library 7
NEON-2000-JNX FLR
Neon_SetDIO0Config
Sets the DIO0 config type. DIO_CONFIGTYPE_DIGITAL
means the DI0 and DO0 are the same as the general DI
and DO. DIO_CONFIGTYPE_SNAPSHOT means the DI0
and DO0 are for triggering the camera and strobe out.
Syntax
C/C++
int Neon_SetDIO0Config (int iCfg_type)
Parameter(s)
iCfg_type:
The config type value can be 0 or 1. Use the following
enumeration to define the value.
enum DIO_CONFIGTYPE
{
DIO_CONFIGTYPE_SNAPSHOT=0,
DIO_CONFIGTYPE_DIGITAL,
DIO_CONFIGTYPE_MAXIMUM
};
Return Code
Returns true if successful, otherwise COMMON_ERROR.

8 Function Library
Neon_GetDIO0Config
Gets the DIO0 config type. DIO_CONFIGTYPE_DIGITAL
means the DI0 and DO0 are the same as the general DI
and DO. DIO_CONFIGTYPE_SNAPSHOT means the DI0
and DO0 are for triggering the camera and strobe out.
Syntax
C/C++
int Neon_GetDIO0Config (int* iCfg_type)
Parameter(s)
iCfg_type:
The config type value can be 0 or 1. Use the following
enumeration to define the value.
enum DIO_CONFIGTYPE
{
DIO_CONFIGTYPE_SNAPSHOT=0,
DIO_CONFIGTYPE_DIGITAL,
DIO_CONFIGTYPE_MAXIMUM
};
Return Code
Returns true if successful, otherwise COMMON_ERROR.

Function Library 9
NEON-2000-JNX FLR
Neon_SetDITriggerPolarity
Sets the DI trigger polarity. (Default is 0)
Syntax
C/C++
int Neon_SetDITriggerPolarity (unsigned int
iIndex, int iPositiveTriggerPolarity)
Parameter(s)
iIndex:
Sets the DI Index; zero-based.
iPositiveTriggerPolarity:
The trigger polarity. Refer to DI_TRIGGERPOLARITY.
enum DI_TRIGGERPOLARITY
{
DI_TRIGGERPOLARITY_FALLING=0,
DI_TRIGGERPOLARITY_RISING,
DI_TRIGGERPOLARITY_BOTH,
DI_TRIGGERPOLARITY_MAXIMUM
};
Return Code
Returns true if successful, otherwise COMMON_ERROR.

10 Function Library
Neon_GetDITriggerPolarity
Gets the DI trigger polarity. (Default is 0)
Syntax
C/C++
int Neon_GetDITriggerPolarity (unsigned int
iIndex, int* iPositiveTriggerPolarity)
Parameter(s)
iIndex:
Gets the DI Index; zero-based.
iPositiveTriggerPolarity:
The trigger polarity. Refer to DI_TRIGGERPOLARITY.
enum DI_TRIGGERPOLARITY
{
DI_TRIGGERPOLARITY_FALLING=0,
DI_TRIGGERPOLARITY_RISING,
DI_TRIGGERPOLARITY_BOTH,
DI_TRIGGERPOLARITY_MAXIMUM
};
Return Code
Returns true if successful, otherwise COMMON_ERROR.

Function Library 11
NEON-2000-JNX FLR
Neon_SetDITriggerCallback
Sets the DI trigger callback function. When the DI is trig-
gered, the callback function will be executed.
Syntax
C/C++
int Neon_SetDITriggerCallback
(NEON_DITRIGGER_CALLBACK callback)
Parameter(s)
callback:
The NEON_DITRIGGER_CALLBACK function pointer.
typedef void (*NEON_DITRIGGER_CALLBACK)
(unsigned int index, int currentState);
index:
The trigger index of the DI. DI0 will be triggered only when
the config type of DIO0 is DIGITAL.
currentState:
The current state of the DI.
Return Code
Returns true if successful, otherwise COMMON_ERROR.

12 Function Library
Neon_SetStrobeOutEnable
Enables/disables the strobe out trigger when DIO0 is set as
DIO_CONFIGTYPE_SNAPSHOT.
Syntax
C/C++
int Neon_SetStrobeOutEnable(int iEnable)
Parameter(s)
iEnable:
1 = enable, 0 = disable.
Return Code
Returns true if successful, otherwise COMMON_ERROR.
Neon_GetStrobeOutEnable
Gets the enabled state of the strobe out trigger when DIO0
is set as DIO_CONFIGTYPE_SNAPSHOT.
Syntax
C/C++
int Neon_GetStrobeOutEnable(int* iEnable)
Parameter(s)
iEnable:
Returns the enabled state.
Return Code
Returns true if successful, otherwise COMMON_ERROR.

Function Library 13
NEON-2000-JNX FLR
Neon_SetStrobeOutDelay
Sets the delay time of the strobe out in microseconds when
DIO0 is set as DIO_CONFIGTYPE_SNAPSHOT.
Syntax
C/C++
int Neon_SetStrobeOutDelay (unsigned int
iMicrosecond)
Parameter(s)
iMicrosecond:
The number of microseconds for the strobe out delay.
(0 - 4294967295, map to 1 - 4294967296 μs)
Return Code
Returns true if successful, otherwise COMMON_ERROR.
Neon_GetStrobeOutDelay
Gets the delay time of the strobe out in microseconds when
DIO0 is set as DIO_CONFIGTYPE_SNAPSHOT.
Syntax
C/C++
int Neon_GetStrobeOutDelay (unsigned int*
iMicrosecond)
Parameter(s)
iMicrosecond:
Returns the number of microseconds of the strobe out
delay.
Return Code
Returns true if successful, otherwise COMMON_ERROR.

14 Function Library
Neon_SetStrobeOutPulseWidth
Sets the pulse width of the strobe out in microseconds when
DIO0 is set as DIO_CONFIGTYPE_SNAPSHOT.
Syntax
C/C++
int Neon_SetStrobeOutPulseWidth (unsigned int
iMicrosecond)
Parameter(s)
iMicrosecond:
The number of microseconds for the strobe out pulse width.
(0 - 4294967295, map to 1 - 4294967296 μs)
Return Code
Returns true if successful, otherwise COMMON_ERROR.
Neon_GetStrobeOutPulseWidth
Gets the pulse width of the strobe out in microseconds
when DIO0 is set as DIO_CONFIGTYPE_SNAPSHOT.
Syntax
C/C++
int Neon_GetStrobeOutPulseWidth (unsigned int*
iMicrosecond)
Parameter(s)
iMicrosecond:
Returns the number of microseconds of the strobe out pulse
width.
Return Code
Returns true if successful, otherwise COMMON_ERROR.
Other manuals for NEON-2000-JNX Series
2
Table of contents
Other ADLINK Technology Digital Camera manuals

ADLINK Technology
ADLINK Technology NEON-1021-M User manual

ADLINK Technology
ADLINK Technology NEON-2000-JNX Series User manual

ADLINK Technology
ADLINK Technology NEON-1020 User manual

ADLINK Technology
ADLINK Technology EVA SDK User manual

ADLINK Technology
ADLINK Technology NEON-1000-MDX Series User manual