News:

  • September 27, 2026, 01:45:37 PM

Login with username, password and session length

Author Topic: Serial Port Diagnostics  (Read 9200 times)

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Serial Port Diagnostics
« on: February 01, 2022, 10:28:56 AM »
Are there any onboard diagnostics to tell me if the on-board serial port is functional/bad in BRX controllers? I was trying to connect to a serial device and couldn't connect to it though the on-board port. I was able to successfully communicate through a SER2-TERM and currently have a SERIO module installed communicating with the device. I made no changes to the Program other than re-directing the SREAMIN/OUT commands. I was getting success on the STREAMOUT but STREAMIN was faulting on the on-board port. 

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Serial Port Diagnostics
« Reply #1 on: February 01, 2022, 11:28:44 AM »
Are there any onboard diagnostics to tell me if the on-board serial port is functional/bad in BRX controllers? I was trying to connect to a serial device and couldn't connect to it though the on-board port. I was able to successfully communicate through a SER2-TERM and currently have a SERIO module installed communicating with the device. I made no changes to the Program other than re-directing the SREAMIN/OUT commands. I was getting success on the STREAMOUT but STREAMIN was faulting on the on-board port.
What was the fault on STREAMIN? For instance, if you execute the STREAMIN before having anything in the queue (IntSerial.InQueue >0?), then it will timeout (if you have that parameters set; "Network Timeout" in STREAMIN instruction). And a success on STREAMOUT means data was sent to the output buffer successfully but doesn't necessarily mean it reached the actual partner device. When you execute the STREAMOUT, you can observe the TX/RX lights on the port. Also, when you send something to the port as well. But it is possible that your onboard port is actually defective.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Serial Port Diagnostics
« Reply #2 on: February 01, 2022, 11:37:09 AM »
No diags. Not too much for the port to fail though, although serial ports are somewhat more subject to static damage than Ethernet.
"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

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Serial Port Diagnostics
« Reply #3 on: February 01, 2022, 12:45:50 PM »
Are there any onboard diagnostics to tell me if the on-board serial port is functional/bad in BRX controllers? I was trying to connect to a serial device and couldn't connect to it though the on-board port. I was able to successfully communicate through a SER2-TERM and currently have a SERIO module installed communicating with the device. I made no changes to the Program other than re-directing the SREAMIN/OUT commands. I was getting success on the STREAMOUT but STREAMIN was faulting on the on-board port.
What was the fault on STREAMIN? For instance, if you execute the STREAMIN before having anything in the queue (IntSerial.InQueue >0?), then it will timeout (if you have that parameters set; "Network Timeout" in STREAMIN instruction). And a success on STREAMOUT means data was sent to the output buffer successfully but doesn't necessarily mean it reached the actual partner device. When you execute the STREAMOUT, you can observe the TX/RX lights on the port. Also, when you send something to the port as well. But it is possible that your onboard port is actually defective.

Comms program is in stages. Timeout is set to 100ms (I varied this without result). TX light was blinking (relatively slowly). No light on RX. I have the Program set to continually loop with stages to attempt to reestablish comms. I set up a trend to view stage activity and you could see STREAMOUT continually being successful but STREAMIN continually faulting.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Serial Port Diagnostics
« Reply #4 on: February 01, 2022, 01:49:29 PM »
Comms program is in stages. Timeout is set to 100ms (I varied this without result). TX light was blinking (relatively slowly). No light on RX. I have the Program set to continually loop with stages to attempt to reestablish comms. I set up a trend to view stage activity and you could see STREAMOUT continually being successful but STREAMIN continually faulting.
I definitely appreciate "comms program is in stages." I don't think folks realize just how perfect Stages are for comms sometimes. Anyways. When you execute STREAMIN, are you not waiting until .InQueue has something in it? In other words, it will do you no good to execute a STREAMIN if there is nothing in the input buffer to retrieve; it will timeout every time. And, as I said, STREAMOUT just puts data in the output buffer. It is the Device itself that gets that data and sends it out the physical port (which "wiggles" the TX light). And if that is working (TX light blinks with the execution of your STREAMOUT), and yet no RX light blinks, then, of course, that sounds like the device you sent it to either did not receive the data, or did not respond. Do the comm parameters match? Good cable? Etc.
There are two types of people in the world; those that can extrapolate from incomplete data sets.