- This topic has 2 replies, 2 voices, and was last updated 1 month, 4 weeks ago by
July 28, 2020 at 4:13 pm #245409ParticipantTopics: 2Replies: 4Points: 32Rank: Member
I have a motorized device that is controlled by serial commands.
Typical text string commands include:
“:G232[0xd]” //Set Motor direction as CCW
“:I2130000[0xd]” //Set Motor Slew Speed
“:J2[0xd]” //Start Motor movement
I am successfully able to serially control the device from an application I have installed on my PC. But I want to be able to control the device via Powershell.
I’ve opened the port this way:
$port= new-Object System.IO.Ports.SerialPort COM4,9600,1,8,1;
All seems to be fine at this point
The commands I’ve tried to write this way:
or this way:
The device is not responding to any of these.
I’m wondering if my syntax for the carriage return is valid?
Any suggestions would be appreciated
July 28, 2020 at 4:18 pm #245412ParticipantTopics: 7Replies: 124Points: 600Rank: Major Contributor
How about trying a CR and LF
Sorry, I am failing to enter the code, the formatting keeps getting lost when I hit submit … bascially,
the backtick is under the tilde
- This reply was modified 2 months ago by TonyD05.
July 29, 2020 at 4:57 pm #245811ParticipantTopics: 2Replies: 4Points: 32Rank: Member
Maybe that’s what I had wrong.
I understood the they were single quote r and single quote n
I’ll try that!
- You must be logged in to reply to this topic.