Messages posted to this category need to be reviewed by the moderator before it gets posted.
TOPIC: Arduino to Smart Motor
Arduino to Smart Motor 4 years, 7 months ago #451
I have a question though about controlling Animatics Smart Motors.
I normally use SMI program's macro function to send:
Now I'm trying to use an Arduino board to send the same command so I can eliminate the need for the computer.
I'm sending simple ascii commands on the P4 RS232 board from moderndevice.com to a single smart motor with no program currently loaded on the motor.
In the smart motor program I can see in the serial analyzer HEX view that it sends an 80 immediately one time before it sends the rest of my ascii commands.
I think that the 80 is to address the motor or tell it to listen to the following commands. (I see CH0,N,8,1 at the top of the terminal).
When sending commands from the terminal in the smart motor program it does not have the 0A or 0D line feed/Carriage return which shows up in HEX view when I hook up my arduino to the computer.
I'm not sure if I have an issue with slave/host modes in RS232.
My code I'm sending is:
changeTime = millis();
It looks the same as the macros I typically send with SMI when viewed in an ascii terminal like PUTTY
Thanks for any advice
I can send a screenshot of the output if needed.
Re: Arduino to Smart Motor 4 years, 6 months ago #464
The Hex 80 (0x80) is a global address for all motors. Hex 81 is the address for motor1... Hex 82 is the address for motor2... etc.
All commands must be terminated with either a SPACE (Hex 20) or a CR (Hex 0D).
Note: the Line Feed character (Hex 0A) is not allowed.
The following user(s) said Thank You: Tetsuya
Re: Arduino to Smart Motor 4 years, 6 months ago #465
I found it worked without addressing
All worked well the Serial board I bought had a mistake in the diagram so I had TX connected to TX.
I'm going to be trying to request torque "RT" and attempt to display min max torque on an LCD next.
Thanks for your reply Csearchy.
Time to create page: 0.40 seconds