在modbus协议中,函数eMBInit( eMBMode eMode, UCHAR ucSlaveAddress, UCHAR ucPort, ULONG ulBaudRate, eMBParity eParity )中的ucSlaveAddress和函数eMBErrorCode eMBSetSlaveID( UCHAR ucSlaveID, BOOL xIsRunning,UCHAR const *pucAdditional, USHORT usAdditionalLen )中的ucSlaveID有什么区别?
在主程序中
if( eMBInit( MB_RTU, 0x01, 6, 38400, MB_PAR_EVEN ) != MB_ENOERR ) { _ftprintf( stderr, _T( "%s: can't initialize modbus stack!\r\n" ), PROG ); iExitCode = EXIT_FAILURE; } else if( eMBSetSlaveID( 0x34, TRUE, ucSlaveID, 3 ) != MB_ENOERR ) { _ftprintf( stderr, _T( "%s: can't set slave id!\r\n" ), PROG ); iExitCode = EXIT_FAILURE; }
其中的0x01和0x34???