beautypg.com

Delta RMC151 User Manual

Page 191

background image

3 Controller Features

4. Read the Plot Data Starting from Dynamic Plot Upload register #0

Upload Mode 3 will always return the newest data whether or not the data causes an

overlap or gap with the last data that was read. Use the Current Index register to

keep track of the data. The Current Index register indicates which sample number of

the plot the last read started at.
Each time you read the plot data, start the read at Dynamic Plot Upload register #0.

Each read will return Dynamic Plot Upload registers 0-4 and the plot samples

beginning at the sample number in the Current Index register. Since each read

includes registers 0-4, you will have access to the Upload Mode/Status, Current

Index, Plot ID, and Samples Uploaded after each read.
To read the plot data repeat these steps:
a. Calculate the Length of the Read.

The length of the read must be long enough to receive the number of samples per

data set that you wrote to the Requested Read Samples register. In addition to

returning Dynamic Plot Upload registers 0-4, each read will return an equal

number of samples from each data set in the plot. Use the following equation to

calculate the length of the read based on how many samples you wish to read:

length = (Requested Read Samples) x (# of data sets) + 5

The number of samples should not be more the number of samples in the plot.
Typically, you will make this calculation once and then always make reads of the

same length.

b. Read from Dynamic Plot Upload register #0

Read from the Dynamic Plot Upload register #0 with the length calculated in step

a.

c. Do any Error Checking

If you wish, you can use Dynamic Plot Upload registers 0-4 to do error checking,

as described below:

Verify that the Upload Status is 0, meaning no errors have occurred. If the

Upload Status is 1, the plot has been triggered, completed capturing, and

has been completely uploaded. To recover, issue the Rearm Plot (103)

command to set it to continuous capture.

Verify that the Plot ID is unchanged. If it has changed, it indicates that you

are no longer reading from the same plot. The plot may have been re-

triggered or reset.

d. Copy Plot Data to Buffer

Before the next read, you should, of course, copy the data you just read to a plot

buffer. Use the Current Index to know where to place the data.
The data is returned in this format:

R

0

, R

1

, R

2

, R

3

,

R

4

A

0

,A

1

,A

2

... A

n-1

B

0

,B

1

,B

2

... B

n-1

C

0

,C

1

,C

2

... C

n-1

D

0

,D

1

,D

2

... D

n-

1

...

where

R

0

= Upload Mode/Status register

R

1

= Requested Read Samples register

R

2

= Current Index register

R

3

= Plot ID register

R

4

= Samples Uploaded register

A = sample from data set 0, B = sample from data set 1, etc.
n = number of samples read per data set.

deltamotion.com

171

This manual is related to the following products: