<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Sending commands through Arduino with RS232 Shield - Communications				            </title>
            <link>https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/</link>
            <description>Animatics Distributor Locator Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Thu, 16 Jul 2026 20:07:51 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Sending commands through Arduino with RS232 Shield</title>
                        <link>https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1294</link>
                        <pubDate>Mon, 04 Feb 2019 13:18:00 +0000</pubDate>
                        <description><![CDATA[ECHO_OFF worked smoothly.
Thanks and regards,
Amrinder Singh]]></description>
                        <content:encoded><![CDATA[ECHO_OFF worked smoothly.
Thanks and regards,
Amrinder Singh]]></content:encoded>
						                            <category domain="https://www.animatics.com/forum/communications/">Communications</category>                        <dc:creator>amrinder703</dc:creator>
                        <guid isPermaLink="true">https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1294</guid>
                    </item>
				                    <item>
                        <title>Sending commands through Arduino with RS232 Shield</title>
                        <link>https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1293</link>
                        <pubDate>Mon, 04 Feb 2019 12:17:21 +0000</pubDate>
                        <description><![CDATA[See the ECHO command in the dev guide. Please note this is not the default state. Also please note that the ADDR value is not initialized automatically on boot up. These settings are changed...]]></description>
                        <content:encoded><![CDATA[See the ECHO command in the dev guide. Please note this is not the default state. Also please note that the ADDR value is not initialized automatically on boot up. These settings are changed when SMI detects or finds motors.]]></content:encoded>
						                            <category domain="https://www.animatics.com/forum/communications/">Communications</category>                        <dc:creator>swalters</dc:creator>
                        <guid isPermaLink="true">https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1293</guid>
                    </item>
				                    <item>
                        <title>Sending commands through Arduino with RS232 Shield</title>
                        <link>https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1292</link>
                        <pubDate>Mon, 04 Feb 2019 12:14:17 +0000</pubDate>
                        <description><![CDATA[Dear Meyer, 

 Finally motors are responding back to RPA commands and I am able to move the motors using PT= positionnumber G comand send in the HEX format. 
The issue was that the RS 232...]]></description>
                        <content:encoded><![CDATA[Dear Meyer, 

 Finally motors are responding back to RPA commands and I am able to move the motors using PT= positionnumber G comand send in the HEX format. 
The issue was that the RS 232 shield has 2nd pin as TX and 3rd as RX and it was same configuration on the 9 pin of motors. After swapping the pins coming from RS232, motor started responding. code looks good. 

Is there any way to get the the only position number from motors rather than having the RPA xxxxx xxxx as reply back from motor.

Thanks for the support and quick replies.]]></content:encoded>
						                            <category domain="https://www.animatics.com/forum/communications/">Communications</category>                        <dc:creator>amrinder703</dc:creator>
                        <guid isPermaLink="true">https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1292</guid>
                    </item>
				                    <item>
                        <title>Sending commands through Arduino with RS232 Shield</title>
                        <link>https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1291</link>
                        <pubDate>Thu, 31 Jan 2019 13:04:58 +0000</pubDate>
                        <description><![CDATA[Amrinder,

Do you get a response from the motor for the RPA command in your arduino code? If not, the method of communication is still not correct.

Either way, you will need to send add...]]></description>
                        <content:encoded><![CDATA[Amrinder,

Do you get a response from the motor for the RPA command in your arduino code? If not, the method of communication is still not correct.

Either way, you will need to send additional commands to the motor in order to see motion. For a position move, you will also need to define MP, VT= , ADT=. You will also need to disable hardware travel limits with EIGN(W,0) once at the beginning of your program.]]></content:encoded>
						                            <category domain="https://www.animatics.com/forum/communications/">Communications</category>                        <dc:creator>mmeyer</dc:creator>
                        <guid isPermaLink="true">https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1291</guid>
                    </item>
				                    <item>
                        <title>Sending commands through Arduino with RS232 Shield</title>
                        <link>https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1290</link>
                        <pubDate>Thu, 31 Jan 2019 10:59:41 +0000</pubDate>
                        <description><![CDATA[Found a way to input HEX format through arduino but the motor is not moving to target position, Please find the program below used to move the motor 1 to a target position. 

 the command ...]]></description>
                        <content:encoded><![CDATA[Found a way to input HEX format through arduino but the motor is not moving to target position, Please find the program below used to move the motor 1 to a target position. 

 the command used is  PT=19590 G (used through termite and it works)
 the command used is (81 50 54 3D 31 39 35 39 30 20 30 20 47 20) (through arduino to motors)
 
 Tested the program in the computer through RS232 Termite terminal and it looks like arduino is pushing right command but the motor is not moving though same command in characters in termite window works. 


// Serial Communication
// 2019
// Purpose: Control the motor position using RS232 communications 
// Status: 

#include 

// Do not use 0 and 1 if you want to be able to upload code while RS232 shield is attached to Arduino
SoftwareSerial mySerial(3, 2); //2 is TX, 3 is RX 

// Motor Commands

byte preset1 = {0x52, 0x50, 0x41, 0x20}; // RPA
byte preset2 = {0x81, 0x50, 0x54, 0x3D, 0x31, 0x39, 0x35, 0x39, 0x30, 0x20, 0x47, 0x20}; //  PT=19590 G 



int delayTime = 500;  //Time between commands

void setup()
{
  Serial.begin(9600); // Serial Communication w/ Computer for Debugging
  mySerial.begin(9600); //  Serial Communication w/ motor
  
//for (int i = 0; i &lt; (sizeof(preset1)); i++) // sizeof returns a count of bytes, not numbers if using int, float, or long
  //{
    //mySerial.write(preset1<i>); // sends each byte sequentially
    //Serial.println("motor comand 1 Byte Sent");
  //}

for (int i = 0; i &lt; (sizeof(preset2)); i++) // sizeof returns a count of bytes, not numbers if using int, float, or long
  {
    mySerial.write(preset2<i>); // sends each byte sequentially
    Serial.println("motor comand 1 Byte Sent");
  }

  delay(delayTime);  //delay to allow motor time for next command

  
}

void loop()
{
 }


Thanks and regards, 
Amrinder Singh]]></content:encoded>
						                            <category domain="https://www.animatics.com/forum/communications/">Communications</category>                        <dc:creator>amrinder703</dc:creator>
                        <guid isPermaLink="true">https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1290</guid>
                    </item>
				                    <item>
                        <title>Sending commands through Arduino with RS232 Shield</title>
                        <link>https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1289</link>
                        <pubDate>Wed, 30 Jan 2019 14:24:09 +0000</pubDate>
                        <description><![CDATA[There is no library. Please consider using the serial.print() as opposed to the write functions and specifying the exact type data being sent.]]></description>
                        <content:encoded><![CDATA[There is no library. Please consider using the serial.print() as opposed to the write functions and specifying the exact type data being sent.]]></content:encoded>
						                            <category domain="https://www.animatics.com/forum/communications/">Communications</category>                        <dc:creator>swalters</dc:creator>
                        <guid isPermaLink="true">https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1289</guid>
                    </item>
				                    <item>
                        <title>Sending commands through Arduino with RS232 Shield</title>
                        <link>https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1288</link>
                        <pubDate>Wed, 30 Jan 2019 14:20:02 +0000</pubDate>
                        <description><![CDATA[I would not think so because i do not see flashing light on my Rx pin which means that motor never responded back. If the Rx light flashes and there is no data displayed that would prove tha...]]></description>
                        <content:encoded><![CDATA[I would not think so because i do not see flashing light on my Rx pin which means that motor never responded back. If the Rx light flashes and there is no data displayed that would prove that method of reading is wrong. 

Tried the read() but it gave -1 which means that no data is available on the port. 

When the motors are restarted, it shows some messages in the termite terminal window  that lens are in home position. When motors are connected to RS232 shield, motors do not communicate (as Rx do not blinks). 

How can i make sure that motors are communicating with the RS232 shield because so far i am not able to see any receiving data (flashing light on RS 232 shield Rx flashes with the incoming data) from motors. 

Is there a arduino library available for class 5 animatic motors to know the position of only master or slave as RPA shows the position of both motors?]]></content:encoded>
						                            <category domain="https://www.animatics.com/forum/communications/">Communications</category>                        <dc:creator>amrinder703</dc:creator>
                        <guid isPermaLink="true">https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1288</guid>
                    </item>
				                    <item>
                        <title>Sending commands through Arduino with RS232 Shield</title>
                        <link>https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1287</link>
                        <pubDate>Wed, 30 Jan 2019 13:40:47 +0000</pubDate>
                        <description><![CDATA[That would seem that Arduino handles serial writes correctly with ASCII characters. Perhaps the discrepancy is in the method of reading. Have you tried read() rather than readString()?]]></description>
                        <content:encoded><![CDATA[That would seem that Arduino handles serial writes correctly with ASCII characters. Perhaps the discrepancy is in the method of reading. Have you tried read() rather than readString()?]]></content:encoded>
						                            <category domain="https://www.animatics.com/forum/communications/">Communications</category>                        <dc:creator>mmeyer</dc:creator>
                        <guid isPermaLink="true">https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1287</guid>
                    </item>
				                    <item>
                        <title>Sending commands through Arduino with RS232 Shield</title>
                        <link>https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1286</link>
                        <pubDate>Wed, 30 Jan 2019 13:34:54 +0000</pubDate>
                        <description><![CDATA[Hello, 
 thanks for the quick reply, I tried using 

mySerial.write(&quot;52 50 41 20 rn&quot;);

 motor did not responded back, The Rx light on arduino did not blink at all.

Thanks and regard...]]></description>
                        <content:encoded><![CDATA[Hello, 
 thanks for the quick reply, I tried using 

mySerial.write("52 50 41 20 rn");

 motor did not responded back, The Rx light on arduino did not blink at all.

Thanks and regards, 
Amrinder Singh]]></content:encoded>
						                            <category domain="https://www.animatics.com/forum/communications/">Communications</category>                        <dc:creator>amrinder703</dc:creator>
                        <guid isPermaLink="true">https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1286</guid>
                    </item>
				                    <item>
                        <title>Sending commands through Arduino with RS232 Shield</title>
                        <link>https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1285</link>
                        <pubDate>Wed, 30 Jan 2019 13:27:18 +0000</pubDate>
                        <description><![CDATA[Hello,

I believe your issue is in the formatting of the commands/characters sent. I have not used the termite terminal before, but my guess is that it has a built-in ASCII/hex converter, ...]]></description>
                        <content:encoded><![CDATA[Hello,

I believe your issue is in the formatting of the commands/characters sent. I have not used the termite terminal before, but my guess is that it has a built-in ASCII/hex converter, while Serial write in Arduino may not. If you open the Serial Sniffer (View &gt; Serial Data Analyzer) in our SMI software, you will see that what is actually being sent to the motor is 52 50 41 20 when you issue "RPA". This is how you will want to communicate. I would check what's actually being sent/received if possible.]]></content:encoded>
						                            <category domain="https://www.animatics.com/forum/communications/">Communications</category>                        <dc:creator>mmeyer</dc:creator>
                        <guid isPermaLink="true">https://www.animatics.com/forum/communications/sending-commands-through-arduino-with-rs232-shield/#post-1285</guid>
                    </item>
							        </channel>
        </rss>
		