Reading dynamic plots

So I’m working with a program that needs to read variable length plots from an rmc150. It needs to read at a rate of 100Hz but I won’t know in advance how long the plot will need to be. I’m looking at the instructions for using dynamic plots. So if I set a requested read samples to 100 to pull 1 second worth of data at a time. After I make that first read from the dynamic plot register does the RMC automatically put the next 100 samples of a plot in the dynamic plot data register and update all of the other dynamic registers as well?

If you are reading a plot that has already been entirely captured, then yes, the RMC will place the next 100 samples in the dynamic plot upload registers and update the pther registers as well.

If you are reading a plot before it has entirely completed being captured, or are reading the plot continuously, the RMC will wait until the next 100 samples have been captured before making them available in the dynamic plot upload registers. However, the other dynamic plot registers are always updated for each time you read them. As explained in the Reading Plots with a Host Controller help topic, Method 3, step 4:
“If there is not enough captured data, the Samples Uploaded register will return 0. Therefore, the typical method of reading a plot is to keep reading the plot data and only using the data when the Samples Uploaded register is non-zero.”

What device are you using the read the plot data? A PLC or a custom program on a PC? We do have some examples, for example, for C# or VBA.

It’s a custom program on a pc written in VB6

I checked, and we do not have a VB6 example for uploading a captured plot. We do have one for reading a plot continuously, but it does not work very well.

Is it possible to get a copy of what you have for reading a plot continuously then? I’m having a problem where I don’t appear to be getting any data from the dynamic plot upload area. I know that I have the correct data items, and sample time, because when I trigger the plot through my software I can see the plot come up in the plot manager of rmc tools. The plot in RMC tools looks normal, but the data I collect in my software from the dynamic plot upload area is all zeroes.

The example is attached.
Trending.zip (99.2 KB)

Dear Jacob,
I am trying to test the VB6 program for trending. While loading the project i am getting the attached massage. When I click on yes the project continues to load. When I try to run the project it shows “Compiles Error: Can’t find project or library” message. For your reference I am attaching the screen shots error message and the code. Can you help me in troubleshooting the problem. The vb trending program will really help me in my future developments.



Message.png

Have you installed RMCLink on your computer?

Do you really need to use VB6? We have newer examples than VB6. It is surprising to us at Delta that we have had so much interest in VB6, since it has not been supported by Microsoft for a long time. That makes it very difficult for us to support the VB6 example. We usually tell the customer “here is a VB6 example that does not work very well, and it is up to you to try to make it work as well as you can.” For newer programming languages, we can provde better support for our examples.

Well I’ve got what I needed to do working now. I’m not working on a new application, I’m modifying an existing legacy program. Also Microsoft is supporting VB6 applications all the way through the lifetime of windows 8 due to the sheer amount of simple programs businesses wrote for themselves back in the 90’s. There’s a surprisingly high demand for who quickly you can deploy simple applications.

Now back to the actual plot discussion. I’ve got what I need, but is there a way to get a timestamp from the controller with the plots? How do I guarantee that I’m collecting at the rate I want to collect at?

When you do the plot trending, you are guaranteed that the plot samples will be at the interval defined by the Plot Template, for example 0.001 sec.
The Current Index value that you get as part of reading the plot data indicates which sample number the currenlty-read data started at. You can use this number to tell whether you are getting gaps in the data or not.
This is somewhat described in the RMCTools help topic “Reading RMC Plots with a Host Controller.”
There is no real-time time-stamping, but the method I described should be sufficient.

Yes, I had a lower version of RMClink installed in my PC. I upgraded it to latest version. Problem solved. Thanks for your valuable support. :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue:

Can you provide a link to some of the examples that use trending in other languages? The only one I can find is the link you listed above for VB6.

I made a new topic with the C# example. I also just tried out the example with my RMC75E, and it works great!

Thanks! I’m struggling with a RMC75E. I’m working in VB6, but I should be able to translate the syntax from the C code.