Maestro TX messages

I’m using maestro 12 to control servos with MAX MSP and it works fine.
Now I would like to use the TX pin to chain a 4 relays board that has a RX input.

How to I send values to the maestro? for controling servo 1 I send from max to the usb/serial port 132 0 1 64, but how shall I proceed to send “things” to the TX output?

thanks for help

Hello.

To send commands to the Maestro’s TTL serial interface, you would need to send the byte sequence commands to the Maestro’s TTL Port. The Maestro has two virtual serial ports (the Command Port and the TTL Port) and three basic serial modes. You can find more details about the Maestro’s different serial interfaces and modes in the “Serial Interface” section of the Maestro’s user’s guide. You should probably use the USB Dual Port serial mode to separate the commands being sent to the Maestro and its TX line.

- Amanda

Thanks for your reply.
I’ve been reading the user’s guide but I still don’t understand how to.

From MAX MSP, (using its serial object), i.e. when I send “132 0 1 64” I to the maestro (via usb dual port mode) I can control the servo attached on pin 0 to its position 64 (and so on for other outputs).
Now at the same time I’d also like to send messages to the attached relay board on the Tx pin. What kind of messages should I send to tell the maestro it is not one of the servo outputs that is concerned but the Tx port? Could you please give me an example of a decimal sequence I have to send ?
Regards
NS

When the Maestro is configured to USB Dual Port serial mode, which you can set under the “Serial Settings” tab in the Maestro Control Center, your computer is allowed to control the Maestro and simultaneously use the RX and TX lines as a general purpose serial port to communicate with other TTL serial devices. In USB Dual Port mode, any bytes you send to the Maestro’s TTL port will be sent directly to your relay boards through the Maestro’s TX line and will not affect the Maestro’s Command Port. If your relay board has some defined communication protocol, you should look at its documentation for how to communicate with it.

- Amanda

well,
it is a good start to know how things can work together…
the relay board is : http://seeit.fr/produits.php?produit_ref=USB-RELAY04

so… you mean messages I send to maestro are send thru it…
I thought I needed some special instructions to tell a Tx port…

well thanks! it helps to understand the process… but is a bit dark for me… here is what they say : can ou translate for me ?!!!


Programming the card: Introduction: After installing the driver software, you can communicate with the relay module board through the virtual serial port COMx.

Code to use with your own development software: - Configure the serial port used by the driver at 9600 bds. - Send the code 0x50 and wait for an answer from the relay module. - Wait 1 second before read the answer. - if answer is: 0xAD -> Relay module 2 channels. - if answer is: 0xAB -> Relay module 4 channels. - if answer is: 0xAC -> Relay module 8 channels. - Send the code 0x51 - Wait 1 second before the board is ready to receive hex code. - For example, send the code 0xFF to turn off all the relays. - Wait 1 second. - Send the code 0x00 to turn on all the relays.

Resume: Code control: Function: 0x50 Read the device identification (0xAD, 0xAB, 0xAC) 0x51 Device ready 0xFE Relay K1 active 0xFF Relay K1 inactive

Bits control 7 6 5 4 3 2 1 0 Relays K8 K7 K6 K5 K4 K3 K2 K1 Ex: Relay K1 on 1 1 1 1 1 1 1 0 Ex: Relay K1 off 1 1 1 1 1 1 1 1

Python language example: import serial import time fd=serial.Serial(“COM3”,9600) time.sleep(1) fd.write(‘x50’) time.sleep(0.5) fd.write(‘x51’) def relay_1(): fd.write(‘x00’) time.sleep(1) fd.write(‘x01’)

Sorry but it this is totaly obscure for me.
I just want to know how to tell relay k1 on or off… relay 2 on/ off and so on.
I do know it looks like 0000 0001 0010… (and so on… with converting this to dec to serial port)
but HOW do I send that thru maestro serial ?

thanks:confused:

I am not familiar with your relay board. I suggest contacting the manufacturer of the relay board for help with communicating with their products and post on the Max MSP forum for help with the software.

No, there is no special command to use the Maestro’s TTL Port. You just need to send whatever commands you want to your relay board through the TTL port. The TTL port is a separate COM port from the Command port that you use to send commands to the Maestro. You might try using our Serial Transmitter utility for Windows (or any serial terminal that sends raw bytes) to communicate with your relay boards.

- Amanda