Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

CRBasic Program with 2 scan rates


MikeC Feb 2, 2012 06:42 PM

Hi all.

We have a programme reading about 20 inputs. We want 5 of these to be scanned at 50ms, the rest at 1 sec.

Even though the logic seems a bit reversed (i.e. a higher scan rate inside the slower scan rate of the main scan) - we are convinced our program adheres to the manual, and should work.

We have the main scan running at 1 second, and nested within a subscan running at 50ms. No matter what we do we can not output the subscan readings to the datatable faster than 1 second. It doesn't sound logical to me, but the manual states that SubScan is to be used when certain analogue readings are required to be taken at a faster rate than the main scan, or am I missing something?

We've dodged the issue (in a very unsatisfactory way) by reading all channels at 50ms, and then only outputting the 5 channels we wanted reading at 50 ms on their own, into their own table.

My colleague assures me on the CR23X he could use dual scan rates and have a single table produced. We are using a CR3000 for this job, obviously through CRBasic.

Thanks for your help.

Mike.


TweedleDee Feb 2, 2012 07:03 PM

Make sure that you call the table from within the Subscan construct. Also, make sure that the DataTable's DataInterval statement has zeros for the first three parameters:
DataInterval (0,0,0,10)
This will setup up the table to output every time it is called.

With that all said, it might be better to use a SlowSequence scan for your Slower measurements.


MikeC Feb 2, 2012 07:06 PM

Hi TD,

Thanks for reply.

Sorry, I should have mentioned that we can't use SlowSequence as we need to read some pulse counts.

I shall try your suggestion tomorrow at work......I've tried many things, but can't remember whether I tried this or not.

Regards,

Mike.

Log in or register to post/reply in the forum.