News:

  • September 02, 2026, 10:51:36 PM

Login with username, password and session length

Author Topic: Serial stops reading until power cycle.  (Read 24631 times)

CReese

  • Hero Member
  • *****
  • Posts: 184
Serial stops reading until power cycle.
« on: April 16, 2014, 05:16:37 PM »
Hello,

I'm using a CAN/serial converter: http://www.adfweb.com/download/filefold/CANbus_from_to_RS232_MN67290_ENG.pdf

I've got it set up to read messages happily using STREAMIN @IntSerial, but after a minute or two it just stops reading. No activity light on the CPU. The program is still cycling as it's logging failed read operations, and CAN device is still transmitting, as if I power down the CPU and then power it back up, I'm again receiving messages. Taking it out of run or stopping the PLC also doesn't do the trick. Any idea what could be happening here?

Thanks,
Colin

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6175
  • Yes Pinky, Do-more will control the world!
Re: Serial stops reading until power cycle.
« Reply #1 on: April 16, 2014, 05:19:44 PM »
That sounds familiar. What version of firmware are you running?
"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

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Serial stops reading until power cycle.
« Reply #2 on: April 16, 2014, 05:24:13 PM »
1.1.0. No asterisk here on NetEdit.

C

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6175
  • Yes Pinky, Do-more will control the world!
Re: Serial stops reading until power cycle.
« Reply #3 on: April 16, 2014, 05:29:56 PM »
NetEdit doesn't know how to update Do-more. Not sure what version fixed that, but it sounds like something that was fixed. Not in office, but I'll check later.
"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

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Serial stops reading until power cycle.
« Reply #4 on: April 16, 2014, 05:45:49 PM »
I updated ALL the things. No love.

Colin

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6175
  • Yes Pinky, Do-more will control the world!
Re: Serial stops reading until power cycle.
« Reply #5 on: April 16, 2014, 05:49:40 PM »
What version? The bug was a condition that would cause the receive interrupt to get shut off in the internal serial port. It would run for a few seconds to a few minutes, stop receiving, and required a power cycle to fix. I'm pretty sure it was introduced in 1.1.0, and fixed shortly after.
"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

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Serial stops reading until power cycle.
« Reply #6 on: April 16, 2014, 05:55:45 PM »
DM: 1.3.0
OS: 1.2.0
Booter: 3.0.5
FPGA: 3.5
Hardware: 7B

I forgot I happen to have a serial module plugged into this guy, so I went ahead and switched over and it's working great. Happy to test and fix the internal serial though, as I don't really NEED an additional three serial ports in this applications.

Colin

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6175
  • Yes Pinky, Do-more will control the world!
Re: Serial stops reading until power cycle.
« Reply #7 on: April 16, 2014, 06:00:13 PM »
So 1.2.0, huh? Poo.


What are your port settings, your PLC scan time, and what is the input data typically?
"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

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Serial stops reading until power cycle.
« Reply #8 on: April 16, 2014, 06:11:47 PM »
I've tried about every port setting there is.

For the CAN protocol converter, I need to use 115200 no parity. I've used 8/1 data/stop, and every combination under the sun for the other two settings. Data comes through fine, just very shortly. Interestingly, changing the serial settings does result in reads working shortly thereafter as well.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6175
  • Yes Pinky, Do-more will control the world!
Re: Serial stops reading until power cycle.
« Reply #9 on: April 16, 2014, 09:30:22 PM »
That is exactly the bug I fixed. After an update it works again because the port is reinitialized. I wonder if the fix got removed somehow...
"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: 6175
  • Yes Pinky, Do-more will control the world!
Re: Serial stops reading until power cycle.
« Reply #10 on: April 17, 2014, 10:04:29 AM »
After studying it, I think this is a different issue. It looks like if the port FIFO gets full, I'm shutting off the interrupt and not re-enabling when the data is read. I'll pursue that, but out of curiosity, when you do a DEVCLEAR on the serial port, does it start receiving again?
"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

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Serial stops reading until power cycle.
« Reply #11 on: April 22, 2014, 04:37:26 PM »
I will definitely check when I get over there. Thanks.

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Serial stops reading until power cycle.
« Reply #12 on: May 14, 2014, 06:26:47 PM »
I'll test this when I'm back to the test bench, but do you have any more ideas? An uprev on design has eliminated my serial card.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6175
  • Yes Pinky, Do-more will control the world!
Re: Serial stops reading until power cycle.
« Reply #13 on: May 14, 2014, 07:35:25 PM »
It's been fixed in the latest firmware.
"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

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Serial stops reading until power cycle.
« Reply #14 on: May 15, 2014, 01:34:57 PM »
Great. Thanks.