Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

modbus_rtu_set_serial_mode(3) [debian man page]

MODBUS_RTU_SET_SERIA(3) 					 Libmodbus Manual					   MODBUS_RTU_SET_SERIA(3)

NAME
modbus_rtu_set_serial_mode - set the serial mode SYNOPSIS
int modbus_rtu_set_serial_mode(modbus_t *ctx); DESCRIPTION
The modbus_rtu_set_serial_mode() function shall set the selected serial mode: MODBUS_RTU_RS232 the serial line is set for RS232 communication. RS-232 (Recommended Standard 232) is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports MODBUS_RTU_RS485 the serial line is set for RS485 communication. EIA-485, also known as TIA/EIA-485 or RS-485, is a standard defining the electrical characteristics of drivers and receivers for use in balanced digital multipoint systems. This standard is widely used for communications in industrial automation because it can be used effectively over long distances and in electrically noisy environments. This function is only supported on Linux kernels 2.6.28 onwards. RETURN VALUE
The modbus_set_serial_mode() function shall return 0 if successful. Otherwise it shall return -1 and set errno to one of the values defined below. ERRORS
EINVAL The current libmodbus backend is not RTU. ENOTSUP The function is not supported on your platform. If the call to ioctl() fails, the error code of ioctl will be returned. AUTHORS
The libmodbus documentation was written by Stephane Raimbault <stephane.raimbault@gmail.com[1]> NOTES
1. stephane.raimbault@gmail.com mailto:stephane.raimbault@gmail.com libmodbus 3.0.3 05/26/2012 MODBUS_RTU_SET_SERIA(3)

Check Out this Related Man Page

MODBUS_REPLY_EXCEPTI(3) 					 Libmodbus Manual					   MODBUS_REPLY_EXCEPTI(3)

NAME
modbus_reply_exception - send an exception reponse SYNOPSIS
*int modbus_reply_exception(modbus_t *ctx, const uint8_t *req, unsigned int exception_code); DESCRIPTION
The modbus_reply_exception() function shall send an exception response based on the exception_code in argument. The libmodbus provides the following exception codes: o MODBUS_EXCEPTION_ILLEGAL_FUNCTION (1) o MODBUS_EXCEPTION_ILLEGAL_DATA_ADDRESS (2) o MODBUS_EXCEPTION_ILLEGAL_DATA_VALUE (3) o MODBUS_EXCEPTION_SLAVE_OR_SERVER_FAILURE (4) o MODBUS_EXCEPTION_ACKNOWLEDGE (5) o MODBUS_EXCEPTION_SLAVE_OR_SERVER_BUSY (6) o MODBUS_EXCEPTION_NEGATIVE_ACKNOWLEDGE (7) o MODBUS_EXCEPTION_MEMORY_PARITY (8) o MODBUS_EXCEPTION_NOT_DEFINED (9) o MODBUS_EXCEPTION_GATEWAY_PATH (10) o MODBUS_EXCEPTION_GATEWAY_TARGET (11) The initial request req is required to build a valid response. RETURN VALUE
The modbus_reply_exception() function shall return the length of the response sent if successful. Otherwise it shall return -1 and set errno. ERRORS
EINVAL The exception code is invalid SEE ALSO
modbus_reply(3) libmodbus(7) AUTHORS
The libmodbus documentation was written by Stephane Raimbault <stephane.raimbault@gmail.com[1]> NOTES
1. stephane.raimbault@gmail.com mailto:stephane.raimbault@gmail.com libmodbus 3.0.3 05/26/2012 MODBUS_REPLY_EXCEPTI(3)
Man Page

6 More Discussions You Might Find Interesting

1. Programming

RS232 communication optimisation

Need help for RS232 communication with switches in order to optimise the data traffic. How to manipulate different flags in termios struct to do the same? (1 Reply)
Discussion started by: ManishSaxena
1 Replies

2. UNIX for Advanced & Expert Users

Serial Communication in UNIX

Hi, I am working on serial communication on Unix. Can anyone guide me through it. The steps required for RS 232 communication and can i do serial communication even if i dont have super user previledges. Thankx, Vicky (1 Reply)
Discussion started by: Vicky
1 Replies

3. UNIX for Dummies Questions & Answers

What are pageouts ?

How and where can I read definition of such terms in unix ? There is a manual on Unix. How can one access it ? -- Sven-Brussels GSM: +32 (0)485/389679 OSX.1.1.5-EntX:iBook-PowerPC G3 500Mhz/128MBRam-AZERTY-Keyboard (1 Reply)
Discussion started by: aertssven
1 Replies

4. AIX

P520 AIX com port (tty0) settings

I have software running under AIX 5.3 that should communicate with a special device using standard communication protocol (Modbus) using serial RS-232 line The settings are correct in both sides, But I can't establish a connection. I suspect that there's something that I should do regarding the... (3 Replies)
Discussion started by: ayman metwally
3 Replies

5. AIX

Console Setup for RS-232 port on 9131-52A

Hi, I have tried to setup the console on a Power5 9131-52A type IBM Server. On the back there are 2 RS-232 ports labeled T1 T2. I am going under the assuming that these are the serial ports (Normally the serial ports are S1 S0). When I finish assigning the console under smit, I get no response... (3 Replies)
Discussion started by: mrmurdock
3 Replies

6. UNIX for Dummies Questions & Answers

Serial Lines Explained

Thanks a lot first of all Corona688 for being extremely patient with all my queries and answer them as simply as possible. Now I am thinking of starting a new thread about Serial ports, but before that I am asking for some reading material on serial ports and terminal devices. So that when I come... (7 Replies)
Discussion started by: sreyan32
7 Replies