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
 Forum for Origin C
 Can we use Origin-C for data acquisition
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

rnnelson

USA
3 Posts

Posted - 04/05/2002 :  09:28:09 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Is there any way one can use Visual C or similar DLL's such as which come with National Instruments data acqusition boards to make Origin my data acquisition program? I know that in the past (long ago) there was LabGPIB for a similar concept.

cpyang

USA
1406 Posts

Posted - 04/05/2002 :  7:50:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Examples for NI-488 GPIB support as well as RS232 support using Origin C are available in the Orgin C PDF.

Origin C can call any DLLs written using Microsoft compilers, so in principle there should be no problem.

CP


Go to Top of Page

gilles wat

France
20 Posts

Posted - 04/29/2002 :  09:58:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Where is the Origin C PDF file?
Go to Top of Page

Barb Tobias

USA
305 Posts

Posted - 04/29/2002 :  10:27:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here is a link to the PDF:
http://www.originlab.com/PDFs/originc.pdf

This code example will also be included in the Programming Guide Help file in the first Origin 7 patch, due out soon.

Go to Top of Page

gilles wat

France
20 Posts

Posted - 04/30/2002 :  05:58:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In order to read or write on a port, include the header file:
#pragma dll(c:\WINDOWS\SYSTEM\Msvcrt)
int __cdecl _inp(unsigned short port);
int __cdecl _outp(unsigned short port, int value);

and if short port is the port number
the function:
int a= _inp(port) read the byte on the port
int b= _outp(port,databyte) write
Go to Top of Page

Jason@

USA
1 Posts

Posted - 04/30/2002 :  1:23:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Instead of hardcoded system path, you can code it as #pragma dll(msvcrt, system).
Jason

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