最佳答案:如果通讯没有故障,那就是硬件接线有问题。将任何一头的两根通讯线对调一下再去试试看,通讯数据是不是异常。通讯设置和通讯程序编写参考下面链接。
自由口:
https://www.ad.siemens.com.cn/productportal/Prods/s7-200-smart-portal/200SmartTop/SmartSMS/019.html
自由口通信端口定义:
https://www.ad.siemens.com.cn/productportal/Prods/s7-200-smart-portal/200SmartTop/communication/serial_port/freeport/set_port.htm
自由口通信常见问题:
https://www.ad.siemens.com.cn/productportal/Prods/s7-200-smart-portal/200SmartTop/communication/serial_port/freeport/FAQ.htm