News:

  • August 24, 2026, 11:00:19 PM

Login with username, password and session length

Author Topic: BRX ASCII out via RS-232  (Read 8725 times)

EDurako

  • Sr. Member
  • ****
  • Posts: 52
BRX ASCII out via RS-232
« on: August 09, 2018, 12:44:50 PM »
I recently posted trying to get hex out of the RS485 port. Thanks everyone for the help, I got it to work but the printer needed to print 1 extra label for changes in the message to take effect. So enter printer number 2!

I think this is going to be more simple, but I am puzzled by the BRX (BX-DM1E-M-D) behavior.

When set to RS485 the TX and RX lights on the internal serial port energize according to the logic.
When set to RS232 the TX and RX lights on the internal serial port stay dark.

I am just trying to send a Status Query to the printer. I have verified that the baud rate is set correctly and I am sending data from a VDC device to a VDC device, both connected to the same 0VDC terminal on the 24VDC power supply.

The print to string scrip I am running is "$1b$53$2a" which is what I translated <ESC>S* from the printer manual. Insert spaces in UN-checked for the print string command.

I am expecting the printer to return a 0 for OK, via STREAMIN but nothing is happening.

I think I have the RS232 port setup wrong or maybe I'm using the wrong commands since the TX and RX lights are dark?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: BRX ASCII out via RS-232
« Reply #1 on: August 09, 2018, 12:55:00 PM »
Whether the port is in RS232 or RS485 mode shouldn't affect the TX LED coming on. Not sure what could be going wrong.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: BRX ASCII out via RS-232
« Reply #2 on: August 09, 2018, 12:56:24 PM »
I bet the device is blocked on a STREAMIN call...
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

EDurako

  • Sr. Member
  • ****
  • Posts: 52
Re: BRX ASCII out via RS-232
« Reply #3 on: August 09, 2018, 01:10:44 PM »
Problem solved. It was the ground, the company that supplies these toys keeps incorrectly making the connector cables!!!

Also, the TX and RX lights now work!

Much love to those who took the time to read and reply!

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6172
  • Yes Pinky, Do-more will control the world!
Re: BRX ASCII out via RS-232
« Reply #4 on: August 09, 2018, 01:21:00 PM »
Problem solved. It was the ground, the company that supplies these toys keeps incorrectly making the connector cables!!!

Also, the TX and RX lights now work!

Much love to those who took the time to read and reply!

Great!

Just a programming note: You have a length and delimiter set to terminate the STREAMIN, but no timeout. If you don't get the expected data, that will hang. If you know what the expected length is, you can wait until IntSerial.InQueue shows the expected bytes prior to calling STREAMIN, but if you don't know, you really need to use a timeout.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO