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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Binary import with ImpBin2D
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

SteffenG

Germany
Posts

Posted - 02/22/2010 :  06:59:49 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin v8.0G SR6

Hello,

I try to use the X-function ImpBin2d to import binary data. I use the following lines of code:
dlgfile group:=*.dbm;
impbin2d ncols:=1 bytes:=1 sign:=unsigned offset:=0 orng:=!1;

First line is for the file dialog to choose the file which should be imported. The second line calls the X-function.
Here are my questions:
1. The orng-parameter seems not to work. It doesn't matter which column I determine with this parameter. Each time the first column is used for the imported data.
2. After running the code in the "old" script window or with run.section-command from a ogs.file and calculate a second column with values from the first column no values are to be seen in the second column. But if one set for instance with col(2)[20]=888; the value of cell 20 in column 2 the values from cell 1 to cell 19 of column 2 appear.
3. If one wants to write the longname of column 2 with for instance col(2)[l]$=test; Origin crashes with an error message in the script window. The error messages sounds like, a matrix could not have exceed more than 90.000.000 values.

Hopefully there is someone out there who can discuss these strange issues with me.

Best regards,
Steffen

SteffenG

Germany
Posts

Posted - 02/23/2010 :  01:14:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello again,

regarding issue #2 I succeeded with the code line
set %H -e $(wks.nrows);
With this code I extend the display range of the whole worksheet. Now I see all of the calculated values.
Maybe this could be implemented into the X-function for the next service release.

Best regards,
Steffen
Go to Top of Page

easwar

USA
1964 Posts

Posted - 02/23/2010 :  10:06:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Steffen,

Are you importing the data into a matrix window?

As for #1, if target is worksheet, we do not allow specifying a column, it always goes into col 1 - we will look into this.

As for #3, if the window is matrix, we can reproduce the crash - thanks for reporting this.

Easwar
OriginLab
Go to Top of Page

SteffenG

Germany
Posts

Posted - 02/24/2010 :  07:50:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Easwar,

I import the values in a worksheet window. I do not using a matrix window.

I changed my script a little bit. Now there are some more values to be calculated but now first attempt of the script give me many errors regarding (I am trying to translate the erro message to English.) "Book1_spectra (this is the target column) could not get enough memory" or error message "Not enough local memory to generate dataset #C6FB488XB_Mx". The name of the dataset is not related to any of my files, datasets. It looks like an temporary dataset from Origin. The second attempt to run the script or sometimes the first will crash Origin immediately. For me it sounds like a problem with memory allocation or some issues with pointers showing to somewhere.

Hope you could fix the problem. Meanwhile I try to write an OriginC-Module which reads the files with ReadInt or ReadFloat.

Regards,
Steffen
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000