The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Automation Server/COM and LabVIEW
 live data view

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
hanskloss Posted - 12/05/2008 : 4:36:34 PM
Origin Ver. and SR (Select Help-->About Origin): 8 Pro, SR4
Operating System: Windows XP

Hi
I would like to use Origin to provide "live" view of neutron scattering data while it is being collected.

I have a set of classes (in C#) that control and receive data from our Data Acquisition System (DAS) - which are histograms of one or two independent variables. They would qualify, I guess, in Origin language as 2-D or 3-D data sets.

Now we would like to plot them and periodically update the plots with fresh data (say every 1-2 seconds while the data are being taken).

As I am not [yet :)] an Origin expert - I am a quite proficient developer - I would like to ask what would be the most optimal way to attack this problem?

1) Create an OPJ project with origin, let my COM app load it, and then send fresh data?
2) Use Lab Talk commands to do the job?
3) Something else?

Again, I do not want to reinvent the wheel and I think that Origin does a pretty good job in presenting the data. All I would like to do is to send the data that is ready for presentation to Origin

Thanks for you help

Piotr


20   L A T E S T    R E P L I E S    (Newest First)
lindseynicole010 Posted - 11/12/2016 : 05:22:41 AM
thanks
long123 Posted - 06/18/2015 : 02:36:34 AM
We found that matrix image view does not support user supplied colormap, so we will need to use an image plot to allow a colormap to be used. We will show an example of image plot with colormap shortly.


sbvdxfnbghm
greg Posted - 09/08/2014 : 4:07:08 PM
FYI:
The final Service Release for Origin 8 was SR6.
You can check here:
http://www.originlab.com/index.aspx?go=SUPPORT/ServiceReleases
hanskloss Posted - 02/03/2009 : 1:20:20 PM
Is the SR5 coming soon?
cpyang Posted - 12/17/2008 : 10:20:04 PM
We have decided to add Colormap class to COM, so better just use default gray image for now and wait a couple of weeks for SR5, where the colormap can be applied to the Image in the matrix itself, without having to use a separate plot and can be configured with two arrays, array of levels and array of RGB.

CP
hanskloss Posted - 12/17/2008 : 9:13:50 PM
Can one perhaps issue a bunch of LabTalk commands?
cpyang Posted - 12/16/2008 : 5:51:59 PM
Sorry, looks like we do not have COM support for colormap. The following is an Origin C example. We will look and see how to do the same thing in COM.

http://ocwiki.originlab.com/index.php?title=OriginC:Image_Plot

hanskloss Posted - 12/16/2008 : 3:06:47 PM
What about the example with colormap?
cpyang Posted - 12/15/2008 : 7:10:33 PM
quote:
For a matrix of 640x480, updating 2 times a second allow rather comfortable continue usage of Origin with the live update. 3 Times a second seems to shows some delay.



We have made some improvement on sending matrix data to Origin, so with the above, refreshing 5 times a second is quite comfortable in the upcoming SR5.

CP
cpyang Posted - 12/09/2008 : 11:41:51 AM
quote:
int nMax = NUM_ROWS*NUM_COLS - 1;



It is just the max value put into the matrix as a demo. I was using

nc + nr

so that was why.

We found that matrix image view does not support user supplied colormap, so we will need to use an image plot to allow a colormap to be used. We will show an example of image plot with colormap shortly.


CP
hanskloss Posted - 12/09/2008 : 10:52:02 AM
Shouldn't your nMax in timer1_Tick be
int nMax = NUM_ROWS*NUM_COLS - 1;
?

You have:
int nMax = (NUM_ROWS - 1) + (NUM_COLS - 1);

cpyang Posted - 12/08/2008 : 9:02:33 PM
We have put together an example for the next SR. You can see if you can follow it with just the codes from this wiki link:

http://wiki.originlab.com/~originla/wiki/index.php?title=OriginCOM:Images_and_Plots_Live_Update

For a matrix of 640x480, updating 2 times a second allow rather comfortable continue usage of Origin with the live update. 3 Times a second seems to shows some delay.

CP
hanskloss Posted - 12/08/2008 : 5:36:25 PM
I am anxiously waiting for the examples.
cpyang Posted - 12/08/2008 : 4:08:20 PM
We will add an example in C# to use a timer to send a matrix over to Origin and see the image update.

CP
hanskloss Posted - 12/08/2008 : 10:46:52 AM
Yes the data is a matrix (essentially an image).

All I need is an image display with a given color map. I do not need the ability to rotate all the unnecessary 3-D stuff. Basically I need something similar to Matlab imshow()
cpyang Posted - 12/07/2008 : 07:18:38 AM
3D surface plot will be much slower. We will need to create an example and do some test.

I assume then that you are sending over data as a matrix? The fastest would be to set the matrix as Image view and directly visualize the image on the matrix. Or to make an image plot, that is pretty much the same in terms of refresh speed. You may also consider a contour plot, which is still much faster then a 3D surface plot.

CP
hanskloss Posted - 12/06/2008 : 8:34:38 PM
What would be max frequency for 3-D plots?
cpyang Posted - 12/05/2008 : 6:36:52 PM
Our test shows that Origin graph (line plots) can be refreshed quite well a dozen times a second. It does not really matter what the buffer size is. So optimally, you would buffer your data so that you send them over to Origin no more then 10 times a second.

CP
hanskloss Posted - 12/05/2008 : 5:30:59 PM
How much slower?
cpyang Posted - 12/05/2008 : 5:22:32 PM
You should buffer your data and then send over to Origin at a slower rate. The following examples shows how to append data to columns and the corresponding plots will live update, but unfortunately it shows adding one point at a time.

http://wiki.originlab.com/~originla/wiki/index.php?title=OriginCOM:Saving_Instrument_Data_to_Worksheet

We will add a new example shortly that shows buffering the values and send over with more points each time.


CP

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000