News:

  • June 25, 2026, 09:20:46 AM

Login with username, password and session length

Author Topic: Device Driver Error on STREAMIN  (Read 19507 times)

CReese

  • Hero Member
  • *****
  • Posts: 184
Device Driver Error on STREAMIN
« on: July 16, 2014, 02:01:24 PM »
Hello,

What are possible sources of error for the following error?

Device Driver Error - $DriverError ST143

I get it when I increase the data length on a stream in on @IntSerial from 2 to 3 bytes. I should be getting at least 10.

Thanks,
Colin

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Device Driver Error on STREAMIN
« Reply #1 on: July 16, 2014, 02:46:22 PM »
Try checking the .inqueue to see what the actual length is that DMD sees in your in-coming stream.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Device Driver Error on STREAMIN
« Reply #2 on: July 16, 2014, 03:04:21 PM »
It is totally unclear from the help how to do this. Which object has the inqueue property?

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Device Driver Error on STREAMIN
« Reply #3 on: July 16, 2014, 03:06:27 PM »
got it. $serio_002_A.inqueue . but where is @IntSerial?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Device Driver Error on STREAMIN
« Reply #4 on: July 16, 2014, 03:52:46 PM »
got it. $serio_002_A.inqueue . but where is @IntSerial?
IntSerial is the image register heap item (note the missing leading "@"; @IntSerial is the device name).  The Device is not the heap item and vice versa.

Some devices have corresponding heap-items, but not all of them do.  If you look on the Device Configuration page of the System Configuration dialog, the last column is labeled Heap Item.  This is the memory-based structure with helpful fields that you can reference in your program or in a Data View or Trend View (like .Inqueue).

See the attached screen shot.

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Device Driver Error on STREAMIN
« Reply #5 on: July 16, 2014, 04:36:50 PM »
So does a timeout raise a serial device error on STREAMIN?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3827
    • Host Engineering
Re: Device Driver Error on STREAMIN
« Reply #6 on: July 16, 2014, 04:49:42 PM »
So does a timeout raise a serial device error on STREAMIN?

Yes.  When you have the Network Timeout "Complete when..." checked, and you timed-out, that means you did NOT meet any of the other criteria for "completion", which means that you have NOT received any data in your STREAMIN buffer.  Since you have no data in your data buffer upon completion of the operation, STREAMIN considers this an "error".

Agreed, some protocols, the lack of data does not necessarily mean an "error" per se, but we leave that up to you.

An alternative is to look at the .Inqueue member and wait until it reaches a known level, THEN perform the STREAMIN WITHOUT the "Network Timeout" as one of the "Complete when" options (you can actually have the Length is Complete when... parameter set to the IntSerial.Inqueue value itself!).

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: Device Driver Error on STREAMIN
« Reply #7 on: July 16, 2014, 08:05:26 PM »
This is good information.

My problem comes, however, with a device that delivers a data payload that is of varying length and ends with a CRC, rather than any terminating character. In this case, I want the timeout but to still retain the buffer data, which will be of variable length. On timeout, however, no data is transferred to the buffer. It seems as though 'transfer to buffer on timeout' should be an option.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6161
  • Yes Pinky, Do-more will control the world!
Re: Device Driver Error on STREAMIN
« Reply #8 on: July 16, 2014, 11:49:47 PM »
So you are getting a payload that is neither terminated nor of a known length? That's odd to me. I didn't design it with the intention that the timeout itself would be the delimiter.

It would be pretty easy to create that function however. Use .InQueue in a delta contact on the reset leg of a timer. Set the preset to the timeout. Timer will fire when it has been idle for the specified timeout. That really might be cleaner than using the timeout of STREAMIN.
"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

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Device Driver Error on STREAMIN
« Reply #9 on: July 17, 2014, 08:09:44 AM »
It sounds like you may need something like this:

« Last Edit: July 17, 2014, 08:14:59 AM by plcnut »
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6161
  • Yes Pinky, Do-more will control the world!
Re: Device Driver Error on STREAMIN
« Reply #10 on: July 17, 2014, 09:17:25 AM »
It sounds like you may need something like this:



Yep.
"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: Device Driver Error on STREAMIN
« Reply #11 on: July 17, 2014, 11:32:42 AM »
So you are getting a payload that is neither terminated nor of a known length? That's odd to me. I didn't design it with the intention that the timeout itself would be the delimiter.

It would be pretty easy to create that function however. Use .InQueue in a delta contact on the reset leg of a timer. Set the preset to the timeout. Timer will fire when it has been idle for the specified timeout. That really might be cleaner than using the timeout of STREAMIN.

It IS odd; I agree. I can see how to program it, but thought I'd ask. Good to know how it works, in any case.