On Sun, 22 May 2016 21:02:15 -0400, you wrote:

>It is confusing indeed.
>
>I have a HAAS CNC machine. The documentation specifically states that
>interaction can occur only through an RS232 port.
>Moving on, I connected the female DB 25 at the HAAS CNC using a null modem
>25 to 9 and an RS232 to USB(initially). This connection worked perfectly
>when i connected it to my PC(USB at the PC). What the CNC does is: I send a
>command from my PC and the CNC spits back corresponding data.
>Now all of it works perfectly fine.
>
>But now I want to replicate the entire thing on a BBB. So that instead of
>my PC there is BBB.
>
>I know the exact null modem + RS 232 works fine with my PC. But is not
>working at all with the BBB.
>No handshake protocols are enabled. I have triple checked that just to be
>sure.
>From what i think at the BBB :it should be DTE since at PC it is. I can try
>making it DCE.

One last time.  

Computer USB (5 volts) to RS232 adaptor (+/- 9 volts or so).  DTE or
DCE is solved by a null modem if needed.

BBB does not put out USB (in this case).  BBB puts out 3.3 volts and
needs 3.3 volts.  RS-232 adaptor MUST accept 3.3 volts from the BBB
and ONLY put out 3.3 volts TO the BBB.

RS-232 adaptor provides the interface to the CNC machine.

1) you MUST use an RS-232 adaptor to connect to the BBB
2) the adaptor MUST be set to produce only 3.3 volts and NOT 5.0 volts
to the BBB
3) once you figure out what the BBB is producing on what pin, and what
the CNC needs to see, connect the RS-232 adaptor accordingly.

IF the BBB is putting out signals on the TXD pin, then you have a
source to drive the RS-232 adaptor.

IF the BBB can see 3.3 volt signals on the RXD pin, then you can
listen to the CNC machine if it says anything.

I'd suggest the following:

1) oscilloscope
2) RS-232 analyzer (if needed)

The bits about CTS, RTS, CD, DSR and so can be determined from looking
at what the working interface is doing when you measure the signals at
the CNC machine's pins.

Harvey



>
>On Sun, May 22, 2016 at 8:47 PM, Bruce Boyes <[email protected]> wrote:
>
>> @Shaurabh
>> OK they actually have a pretty nice document for that!
>>
>> Now what is your CNC machine? What serial port document do you have for it?
>>
>> The serial cape has only TXD and RXD driven, no handshake or flow control.
>> The CNC might expect something specific. It does look like the serial cape
>> has some of the control signals fed back, I did not study it enough and map
>> the 5x2 ribbon cable to the DB9 to figure that out.
>>
>> You would need a null modem cable between the BBB DTE serial port and the
>> CNC DTE serial port, or you can modify the BBB serial as DCE instead. If
>> you make the BBB as DCE, and connect a straight serial cable to your PC
>> DTE, you should see the BBB bootloader information every time BBB powers
>> up. And you can log in to BBB on that serial0 port too.
>>
>> If things are eventually connected correctly to the CNC, it will also see
>> the BBB bootloader information: is that OK for the CNC or will it get
>> confused? If the CNC sends some data to the BBB during bootup it could
>> confuse BBB.
>>
>> So it might be better to use serial4, set as DCE which has no BBB debug
>> use already.
>>
>> If you do that, you could connect serial4 as DCE from BBB to your PC with
>> a straight cable, and pretend your PC is the CNC. See if you can open a
>> terminal on the PC and BBB and see data both ways. If so then it should
>> work on the CNC just by moving the cable over. This assumes the CNC doesn't
>> need some specific flow control or handshake. You might be able to disable
>> that from the CNC side so all it needs is TX and RX.
>>
>> Aren't serial ports wonderfully confusing?
>>
>> At this moment I have a headache from working on code and hardware (not on
>> BBB, we are using a Teensy ARM Cortex M4 this time) talking to a custom
>> RS422-sort-of serial connection so I feel your pain.
>>
>> --
>> For more options, visit http://beagleboard.org/discuss
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "BeagleBoard" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/beagleboard/Z1s_NwXYNrw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beagleboard/CAC32br%2BK65pihWC4ZwDfCB8xgwNxe1pAZ2oj_RWME%3DL3KVPX%3DQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beagleboard/CAC32br%2BK65pihWC4ZwDfCB8xgwNxe1pAZ2oj_RWME%3DL3KVPX%3DQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/d2o4kbtk70ev3aacogg2a6jn7pfeglicp7%404ax.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to