Trouble with Serial...
 
Notifications
Clear all

Trouble with Serial Communication to SM23375DT

1 Posts
1 Users
0 Likes
131 Views
(@jerluenn)
Posts: 0
New Member Guest
 

Hi all,

I am looking to control the SmartMotor via RS-232 communication in Python. However, it seems like every write command from pyserial does not reflect on the serial data analyzer.

Please find the snippet of the code below here:

import time
import serial

ser = serial.Serial(port='COM6', baudrate=9600,
bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE, timeout=2)

ser.write('EIGN(3)'.encode())
ser.write('EIGN(2)'.encode())
ser.write('ZS'.encode())

-------------------------------------------------
Please kindly let me know if I have gotten anything wrong as I'm new to implementing serial communications. Thanks.

 
Posted : 18/07/2020 8:21 pm
Share: