Data Acquisition (DAQ) and Control from Microstar Laboratories

Knowledge Base: DAPstudio

  • See the list of other topics for category DAPstudio

Q10032 Displaying data with different rates on one plot

Tags: Help, DAP, DAPL, DAPstudio, plots, graphics, processing, rate equalization

Applies to: All DAP and DAPL models, DAPstudio "live" plots

I have a process in which I hold a sequence of output levels and capture a block of response data for each level. When I try to plot the output levels and the response data on the same plot in DAPstudio, I get a few points and then the display hangs. Is it possible to do what I want?

Yes. You need to add a little pre-processing in your DAPL configuration.

DAPstudio plots are "live" and assume that the x-axis is time. Unlike graphics displays such as Matlab, which accept data as x-y pairs at arbitrary locations, connecting point-to-point with lines, DAPstudio plots data from left-to right as time increases. Suppose for example that your test sends 10 different output levels, and collects 1000 points at each level. If you send these to DAPstudio, it thinks that the first 10 values from each signal correspond to the same instant of time... leaving 9990 response data samples backlogged in memory. No wonder the display hangs!

You can make the data correspond to what DAPstudio expects using the REPLICATE trick in your DAPL pre-processing. Since each output level sample corresponds to 1000 response samples, you can expand the number of output level samples by a factor of 1000. Then 1000 value of output level data, and 1000 values of response data, line up perfectly and can display nicely on your DAPstudio graphics.

Assume that your configuration already has the pipe called pLevels that you used to generate the 10 output levels. In your Declaration window define a new pipe for your processing configuration to use.

  pipes  pExpanded  word 

Now you can add the REPLICATE task in your processing section to perform the data expansion.

  Replicate(pLevels,1000,pExpanded) 

Tell DAPstudio to have the DAP transfer the pExpanded data and the input response data channel, for example IP0. Click on your graph, and select these same two channels again on the Channels... menu for your plot graphic window.

L23571

See the REPLICATE command description in the DAPL Manual.