⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matlab_serial.txt

📁 matlab串口m文件
💻 TXT
字号:
 SERIAL Construct serial port object.
 
     S = SERIAL('PORT') constructs a serial port object associated with 
     port, PORT. If PORT does not exist or is in use you will not be able 
     to connect the serial port object to the device.
 
     In order to communicate with the device, the object must be connected
     to the serial port with the FOPEN function. 
 
     When the serial port object is constructed, the object's Status property
     is closed. Once the object is connected to the serial port with the
     FOPEN function, the Status property is configured to open. Only one serial
     port object may be connected to a serial port at a time.
 
     S = SERIAL('PORT','P1',V1,'P2',V2,...) constructs a serial port object 
     associated with port, PORT, and with the specified property values. If 
     an invalid property name or property value is specified the object will
     not be created.
 
     Note that the property value pairs can be in any format supported by
     the SET function, i.e., param-value string pairs, structures, and
     param-value cell array pairs.  
 
     Example:
        % To construct a serial port object:
          s1 = serial('COM1');
          s2 = serial('COM2', 'BaudRate', 1200);
 
        % To connect the serial port object to the serial port:
          fopen(s1)
          fopen(s2)	
 
        % To query the device.
          fprintf(s1, '*IDN?');
          idn = fscanf(s1);
 
        % To disconnect the serial port object from the serial port.
          fclose(s1); 
          fclose(s2);
 
     See also SERIAL/FOPEN.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -