Advantech ADAM-4500 user manual Commsend, Commgetrecdatas

Page 20

int stop

Stop bits setting

 

1, 2

 

(stop bit = 1 is for data bits = 5,6,7, or 8)

 

(stop bit = 2 is for data bits = 6,7, or 8)

 

For details, refer to RS-232 chip set data book

int cmd_type

Received data format setting.

 

0: single byte mode. The data format is a single byte character.

 

User can use comm_get_rec_datas to receive single byte data.

 

1: command mode. The data format is a string. User can use

 

comm_get_rec_str to receive string data.

Return:

Returns a 1 if command succeeds. Returns a 0 if it fails.

comm_send

Syntax:

int comm_send(unsigned char c, unsigned char port)

Function Description:

To send a character to a specified communication port.

Parameter

Description

unsigned char c

Represents character to be sent.

unsigned char port

Specifies communication port to which character is sent (COM1

or

COM2)

 

1: COM1 port

 

2: COM2 port

Return:

Returns a 1 if command succeeds. Returns a 0 if it fails.

comm_get_rec_datas

Syntax:

int comm_get_rec_datas(unsigned *length, unsigned char **data, unsigned char port)

Function Description :

The function is called to receive a single byte of data. The function call returns a success flag if the communication port receives any data. The function call returns a failed flag if the buffer of the communication port is empty. The length of the data packet received (in bytes) is stored in parameter "length". The contents of the data packet received are stored in parameter "data".

Parameter

Description

unsigned *length

Returns the length of the received data

unsigned char **data

Returns the received data contents. User must first allocate a

Image 20
Contents ADAM-4500 Installation Guidelines Introduction Features Specifications System DiagramProgramming and Downloading Built-in Real-time Clock and Watchdog Timer IntroductionEmulating Open PC environments Built-in RS-232/RS-485 Communication PortsPower SystemRS-232 Interface RS-485 InterfaceADAM-4500 MechanicalEnvironment Host computer System Requirements to Setup ADAM-4500Function Block Diagram Power supply Wiring the power cables and download cableUtility software Download cableSetup COM port Run utility software in host computerPower on ADAM-4500 Select Communication PortJumper Setting COM1 Port Setting JP1Watchdog Timer Setting JP2 Reset Function Setting JP3Mini Bios Functions ProgrammingPin No. Description RS-485 ConnectionConverting Program Codes Programming the Watchdog Timer Other LimitationsExample Interrupt TypesInstall Utility Software on Host PC Program downloading Connect the cables Transferring files to Sram ADAM-4500s D-driveWrite and simulate control logic on a PC Function Library for Microsoft C ComminitFunction Library for Turbo C Commexit CommopenCommsend CommgetrecdatasLed CommgetrecstrLedinit Wdtclear WdtenableWdtdisable Bit Word length bits Baud rate DivisorBit Fifo trigger level BASE+4 Wichtige Sicherheishinweise

ADAM-4500 specifications

The Advantech ADAM-4500 series represents a critical advancement in the field of industrial automation and remote monitoring with its versatile and robust features. Designed for a wide range of applications across industries, from manufacturing to environmental monitoring, the ADAM-4500 series bridges the gap between traditional data acquisition systems and modern IoT solutions.

One of the main features of the ADAM-4500 series is its ability to support both Ethernet and RS-485 communication, providing flexibility for various network setups. This dual communication capability allows users to connect the devices seamlessly into existing infrastructures while ensuring reliable data transmission over extended distances.

Another key characteristic of the ADAM-4500 series is its modular design. Users can easily configure and expand their systems according to specific project requirements by adding different I/O modules. The series supports a variety of analog and digital I/O modules, catering to diverse input and output needs. This modularity ensures that the system can evolve as technology advances or project demands change.

In terms of technology, the ADAM-4500 incorporates various protocols, including Modbus TCP and RTU, making it compatible with a wide range of SCADA and industrial automation software. Such compatibility simplifies integration and enhances communication across devices, allowing for centralized monitoring and control systems that improve operational efficiency.

The ADAM-4500 series also boasts embedded web servers, enabling users to access real-time data and configure the device through any web browser. This remote access capability is pivotal for monitoring critical parameters without the need for local presence, which is especially useful in extensive or hazardous environments.

In summary, the Advantech ADAM-4500 series combines robust hardware with advanced software features, providing a flexible, scalable, and efficient solution for data acquisition and remote monitoring in industrial applications. With its modular design, comprehensive communication protocols, and remote access capabilities, the ADAM-4500 series stands out as a reliable choice for organizations aiming to enhance their automation and monitoring systems while preparing for the future of IoT integration.