ardbox serial communication

Hi i am trying to use and ardbox to control a ssc-32c robot arm. I have ensured that the tx/rx dip switchs are on, I have set the baud rate to 9600 and when i check the serial monitor tab the ardbox is sending out the serial command. i wrote a very basic code to test moving 1 axis position on the robot but nothing is happening. I have used a an arduino uno with the same program and tx/rx cables and it worked fine so i know the ssc board is ok. Is there a setting or a specific line of program needed to get the ardbox to talk to the robot. I need to use the ardbox as i am receiving 24v inputs from a vision system and need to use 1 of the ardbox output relays fro a trigger signal. I am new to arduino so any help would be much appreciated

I need to use the ardbox

I can assume that you know what an ardbox is, since you are trying to use one.

You should NOT assume that we know what an ardbox is.

An Ardbox is a compact PLC which uses an arduino leonardo board for programming

https://www.robotshop.com/media/files/pdf2/rb-ind-02-user-guide.pdf

When you used the Uno, what code were you running? How was the robot arm connected to the Uno?

On the Leonardo, what code are you using? How is the robot arm connected?

I'm going to hazard a guess that the arm is connected to pins 0 and 1 in both cases. The Serial instance on the UNO writes to those pins, and the serial to USB converter is also connected to those pins. On the Leonardo, that is not the case. Serial writes to the serial to USB converter. Serial1 writes to pins 0 and 1.

i was using the basic code below on both the arduino and for the ardbox/leonardo. i left out any input commands as i just wanted to get the robot moving first. I am using serial connection to talk to the robot. I connected the tx (pin1) on Uno board to rx bin on ssc-3u ( robot controller board) & Gnd to Gnd. On the Ardbox there are serial tx&rx pins. i have the ardbox connected the same as arduino un board. Tx to Rx of ssc board. I didnt connect from pin 0 of arduino or rx on ardbox as i do not need the ssc board to talk to the arduino/ardbox.

I will try Serial1 . hopefullt that works !!! Thanks

void setup() {

Serial.begin(9600);

}
void loop() {

Serial.printIn("#1P1340 T1000 #2P2000 #3P1715 #4P1790 #6P500");

delay(2000);

Serial.printIn("#1P2340 T1000 #2P1835 #3P1715 #4P1790 #6P500");

delay(2000);

Serial.printIn("#1P2340 T1000 #2P1835 #3P1790 #4P1790 #6P500");

}

Thanks for the reply I was hoping this would solve my problem but now “Serial1 was declared in this scope “ is the new error message I am receiving.

Kenkeo:
“Serial1 was declared in this scope “ is the new error message I am receiving.

I assume you mean "was NOT declared".... :slight_smile:

Did you choose Leonardo in Tools > Board? (I tested Serial1.begin() with an Uno, got error; chose Leo, error went away.)

Sorry ya that’s what I meant. Ya the ardbox uses an Leonardo board but you must download there libraries, so you end up selecting ardbox family under the tools tab then choose their ardbox relay board. When I check the port it does state COM6 ( Arduino Leonardo). Very frustrating at this stage !!

Maybe you have a Serial1.print() with no Serial1.begin()- it gives that error also

No unfortunately I do have the Serial1.begin().

Kenkeo:
Ya the ardbox uses an Leonardo board but you must download there libraries, so you end up selecting ardbox family under the tools tab then choose their ardbox relay board. When I check the port it does state COM6 ( Arduino Leonardo).

Maybe you should compile a simple sketch just for a Leo without the ardbox stuff in play at all. Just stick a Serial1.begin() and Serial1.print() in a File > New sketch and see if that compiles for a Leo?

Ya tried that. Funnily enough if I use Serial.begin() with the Leonardo board selected the serial monitor shows the serial commands working fine, but if I use serial1 I don’t see anything in serial monitor. The ardbox is built by industrial shields may have to contact them

As I understand it, Serial1 talks only to the tx / rx pins not to the usb; usb is Serial's business.

not_a_noob:
As I understand it, Serial1 talks only to the tx / rx pins not to the usb; usb is Serial's business.

That is correct. Serial1 output will not show up in the Serial Monitor application.

I am not sure so as if I slelect ardbox family on libraries, I get serial1 not declared error. But if I use select Leonardo I can not monitor serial1. I am considering going back to uno board but I really wanted to use ardbox for the 24v relays!

But if I use select Leonardo I can not monitor serial1.

You could write() (or print()) the same stuff to both Serial and Serial1...

Hi guys. Ardbox use Rx/Tx pins as RS232 or RS485 instead of serial TTL those pins allow use standard protocols as Modbus. You can download the user guide from: https://www.industrialshields.com/web/content?model=ir.attachment&field=datas&id=25113&download=true
On the other hand you can use Pins MISO and MOSI as Rx, Tx working as software serial instead of hardware serial.