Trying to use Arduino as a Data-Logger for Roboteq Motor Controller

Hello all,

I have a Roboteq HDC2460S and I am trying to use an Arduino Uno as a data logging device. The data sheet for the motor controller (linked here) indicates that it provides an RS232 interface for for communication, and according to the user manual, there are certain accepted strings that when sent via RS232 to the motor controller, will return information like temperature, current etc. I purchased an RS232 to TTL converter (this one), and I wired a DB15 to DB9 cable according to the user manual such that the Controller’s TX is connected to the Uno’s RX and vise versa. The Motor controller’s serial settings (parity, stop bits etc.) all match the default 8N1 of the arduino.

Here is my code:

#include <SoftwareSerial.h>

SoftwareSerial mySerial  = SoftwareSerial (5,6); // rx,tx

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  mySerial.begin(115200);
  mySerial.listen();
  Serial.println("Beginning Serial Test");
}

void loop() {
  // put your main code here, to run repeatedly:
  
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
  {
    mySerial.write(Serial.read());
    Serial.println("Command Sent"); 
  }
}

When I type “?T_”, which is one of the accepted strings, in the serial monitor however, there is no response. Any help would be appreciated and if I wasn’t clear on anything feel free to ask.

Thanks.

When I type "?T_", which is one of the accepted strings

How did you determine that to be true?

PaulS: How did you determine that to be true?

From this excerpt from the user manual.

T - Read Temperature Reports the temperature at each of the Heatsink sides and on the internal silicon chips. The reported value is in degrees C with a one degree resolution.

Syntax: ?T [cc] Reply: T=tm:t1:t2

Where: cc = temperature channel tm = internal ICs t1 = channel1 side t2 = channel2 side

And here is the definition of the runtime query according to the user manual of the motor controller:

Runtime queries can be used to read the value of real-time measurements at any time during the controller operation. Real-time queries are very short commands that start with “?” followed by one to three letters. In some instances, queries can be sent with or without a numerical parameter.

I see where the ?T comes into play, but the _?

Perhaps you could post a link (nice job doing that first time around for the data sheet) to the user guide.

I'm wondering if commands are supposed to be ended by CR or LF or both, for instance.

PaulS:
I see where the ?T comes into play, but the _?

Perhaps you could post a link (nice job doing that first time around for the data sheet) to the user guide.

I’m wondering if commands are supposed to be ended by CR or LF or both, for instance.

The user manual is a 244 page pdf, which is too large to attach in its entirety, but I have extracted the relevant pages as a separate pdf which is attached.

Relavant Pages of HDC2460 User Manual.pdf (353 KB)