Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurement studio plot data vs. date/time (Measurement studio for Visual Basic 6)

Hi, I'm trying to do something that should be simple and appears totally possible but I can't get there.

I'd like to plot some data on the y axis vs. the date/time on the x-axis.  I've looked at the samples, and tried modifying the chart properties but I'm doing something wrong and can't get it properly.

Any chance someone has a very simple example of plotting a few points vs. date/time that they can share?

Thanks for any feedback!!

0 Kudos
Message 1 of 4
(7,257 Views)

Hey Larrymcd,

 

What format is your date/time currently in? That might help us find the best way to do this. I was able to find a few examples of plotting a graph with time on the X-axis:

 

http://forums.ni.com/t5/Measurement-Studio-for-NET/Measurement-Studio-Graph-to-plot-with-time-scale/...

 

http://digital.ni.com/public.nsf/allkb/FFC867DDE42029BA8625760300477BEB

 

http://zone.ni.com/devzone/cda/epd/p/id/3334

 

Hopefully some of these can point you in the right direction. If you have any more questions after checking those examples out, please let us know!

0 Kudos
Message 2 of 4
(7,251 Views)

Thanks for the links to the examples!

But I'm trying to do this with old Measurement studio 6 (for visual basic 6).

I've tried formatting the date/time and using different variable types but no luck, I'm sure it's something simple!

If anyone is still using this old version and has any suggestions I'd appreciate any ideas!

Thanks;

 

Larry

0 Kudos
Message 3 of 4
(7,142 Views)

Hey Larry,

 

I found this forum thread, which I think might provide some useful information: http://forums.ni.com/t5/Measurement-Studio-for-NET/Axis-LabelFormat-doesn-t-convert-double-to-DateTi...

 

The way this user was plotting with a date/time was the following, if "rtime" is a DateTime object, and xData is an array of doubles:

 

xData[i] = rtime.ToOAData();

 

 

So basically, the key is this ToOAData function, which converts the DateTime into a double for use with the ActiveX controls in Measurement Studio 6. I would suggest trying that function, and hopefully that will allow you to plot the points. If you continue to have trouble, please let me know and I'd be happy to look into the issue further with you!

0 Kudos
Message 4 of 4
(7,131 Views)