Your new Measurement Computing product comes with a fantastic extra —
Management committed to your satisfaction!
Thank you for choosing a Measurement Computing product—and congratulations! You own the finest, and you can now enjoy
the protection of the most comprehensive warranties and unmatched phone tech support. It’s the embodiment of our mission:
To provide data acquisition hardware and software that will save time and save money.
Simple installations minimize the time between setting up your system and actually making measurements. We offer quick and
simple access to outstanding live FREE technical support to help integrate MCC products into a DAQ system.
Limited Lifetime Warranty: Most MCC products are covered by a limited lifetime warranty against defects in materials or
workmanship for the life of the product, to the original purchaser, unless otherwise noted. Any products found to be defective in
material or workmanship will be repaired, replaced with same or similar device, or refunded at MCC’s discretion. For specific
information, please refer to the terms and conditions of sale.
Harsh Environment Program: Any Measurement Computing product that is damaged due to misuse, or any reason, may be
eligible for replacement with the same or similar device for 50% of the current list price. I/O boards face some harsh
environments, some harsher than the boards are designed to withstand. Contact MCC to determine your product’s eligibility for
this program.
30 Day Money-Back Guarantee: Any Measurement Computing Corporation product may be returned within 30 days of
purchase for a full refund of the price paid for the product being returned. If you are not satisfied, or chose the wrong product by
mistake, you do not have to keep it.
These warranties are in lieu of all other warranties, expressed or implied, including any implied warranty of merchantability or
fitness for a particular application. The remedies provided herein are the buyer’s sole and exclusive remedies. Neither
Measurement Computing Corporation, nor its employees shall be liable for any direct or indirect, special, incidental or
consequential damage arising from the use of its products, even if Measurement Computing Corporation has been notified in
advance of the possibility of such damages.
Trademark and Copyright Information
Measurement Computing Corporation, InstaCal, Universal Library, and the Measurement Computing logo are either trademarks
or registered trademarks of Measurement Computing Corporation. Refer to the Copyrights & Trademarks section on
mccdaq.com/legal for more information about Measurement Computing trademarks. Other product and company names
mentioned herein are trademarks or trade names of their respective companies.
Measurement Computing Corporation does not authorize any Measurement Computing Corporation product for use
in life support systems and/or devices without prior written consent from Measurement Computing Corporation.
Life support devices/systems are devices or systems that, a) are intended for surgical implantation into the body, or
b) support or sustain life and whose failure to perform can be reasonably expected to result in injury. Measurement
Computing Corporation products are not designed with the components required, and are not subject to the testing
required to ensure a level of reliability suitable for the treatment and diagnosis of people.
This DLL will create a thread to send a command to CB-7 000 and receive the response -result from CB-7000. If the
wCheckSum=1, this DLL will automatically add the two checksum bytes to the input string. This DLL will add the [0x0D] to the end of the input string, szCmd. The Send_Cmd is a multi-task, multi-thread DLL.
z Syntax:
WORD Send_Cmd(char cPort, char szCmd[], WORD wTimeOut, WORD wCheckSum)
szResult: the starting address of the result string (terminated with 0)
wT: time of send/receive interval, unit = 1 ms
zReturn Value:
D0-D7=thread status code, thread start=1 and stop=5
D8=0 : send/receive not finished, if 1: send/receive done
D9=1:send/receive timeout
D10=reserved
D11=1:Com handle error
D12=1:send/receive overflow
D13=1 :checksum error
9
4.5 Send_Str
zDescription:
This DLL will create a th read to send a comman d and receive the response-result from a g eneral purpose RS-232
device. The Send_Str is a m ulti-task, multi-thread DLL. This DLL is very similar to Send_Cmd except that this DLL will
notadd any char to the input string.
z Syntax:
WORD Send_Str(char cPort, char szCmd[], WORD wTimeOut, WORD wSendLen, WORD wReceiveLen)
szCmd: the starting address of the original command string (terminated with 0)
wTimeOut: constant for time-out control, unit = 1ms
wSendLen: string length of send-string
wReceiveLen: string length of receive-string
zReturn Value:
NoError : OK
others = Error code, refer to I7000.H
4.6 Send_Receive_Cmd
Description:
This DLL will send a command t o CB-7000 and receive the response-result from CB-7000. If the wCheckSum=1,
this DLL will au tomatically add the two checksum bytes to the input string and check the checksum status of the receive
string. This DLL will add the [0x0D] to the end of the i nput string, szCmd. The Send_Receive_Cmd is not a multi-task
DLL.
z Syntax:
WORD Send_Receive_Cmd(char cPort, char szCmd[], char szResult[], WORD wTimeOut, WORD wCheckSum,
szCmd: the starting address of the input string (terminated with 0)
szResult: the starting address of the result string
wTimeOut: constant for time-out control, unit = 1ms
wCheckSum: 0=DISABLE, 1=ENABLE
wT: time of send/receive interval, unit = 1 ms
zReturn Value:
NoError : OK
others = Error code, refer to I7000.H
10
5 I7000.DLL for Windows 95/NT
The I7000.DLL provides a wide variety of high level calls. These are described in the following sections. For specific
information regarding call usage, please refer to one of the many demo programs.
5.1 Short_Sub_2
z Description:
Compute C=A-B in short format, short=16 bits sign integer.
this DLLs can be called by your programming language, call this subroutine for testing. If this subroutine return the correct
value, the other DLLs will work OK also.
z Syntax:
short Short_Sub_2(short nA, short nB);
z Input Parameter:
nA : short integer
nB : short integer
zReturn Value: return=nA-nB :short integer
This function is provided for testing purpose. To test
5.2 Float_Sub_2
z Description:
Compute C=A-B in float format, float=32 bits floating pointer number.
purpose. To test this DLLs can be called by your programming language, call this subroutine for testing. If this subroutine
return the correct value, the other DLLs will work OK also.
This function is prov ided for testing
z Syntax:
float Float_Sub_2(float fA, float fB);
z Input Parameter:
fA : floating point value
fB : floating point value
zReturn Value: return=fA-fB :floating point value
11
5.3 Get_Dll_Version
z Description: Read the software version of the NAP7000P DLLs.
z Syntax: WORD Get_Dll_Version(void) ;
z Input Parameter: void
z Return Value: return=0x202 :Version 2.2
Read the multi-module analog input value from CB-7000 RS-485 network.. The user can call I7000_AnalogIn to read
analog input value one by one or call this function once for easy programming.
z Syntax:
I7000_NetworkAnalogIn(WORD wPort, WORD wTotal, WORD wT, WORD wID[], WORD wConfig[], WORD
wChksum[], float f7000[])
zInput Parameter:
wPort: RS-232 port number, 1/2/3/4
wTotal: number of modules to read
wT: time out constant, normal=100
wID: wID[?]=module address of module_?, from 0x00 to 0xFF
wConfig: if wID[?]=0x7017 then wConfig[?]=08/09/0A/0B/0C/0D
if wID[?] !=0x7017 then wConfig[?] is ignored
wChksum: if wChksum[?]=1 :the checksum of module_? is enable
f7000[0]: analog value of module_0, channel_0
f7000[1]: analog value of module_0, channel_1
………………………………………………..
f7000[7]: analog value of module_0, channel_7
f7000[8]: analog value of module_1, channel_0
………………………………………………..
f7000[15]: analog value of module_1, channel_7
f7000[n*8]: analog value of module_n, channel_0
f7000[n*8+1]: analog value of module_n, channel_1
………………………………………………..
f7000[n*8+7]: analog value of module_n, channel_7
zReturn Value:
NoError: OK
others: Error code, refer to I7000.H
21
5.14 I7000_NetworkDigitalIn
zDescription:
Read the multi-module digital input value from CB-7000 RS-485 network.. The user can call I7000_DigitalIn to read
analog input value one by one or call this function once for easy programming.
z Syntax:
I7000_NetworkDigitalIn(WORD wPort, WORD wTotal, WORD wT, WORD wID[], WORD wConfig[], WORD
wChksum[], WORD w7000[])
zInput Parameter:
wPort: RS-232 port number, 1/2/3/4
wTotal: number of modules to read
wT: time out constant, normal=100
wID: wID[?]=module address of module_?, from 0x00 to 0xFF
wConfig: reserved.
wChksum: if wChksum[?]=1 :the checksum of module_? is enable
w7000[0]: 16-bit digital value of module_0
w7000[1]: 16-bit digital value of module_1
……………………………………………
w7000[n]: 16-bit digital value of module_n
zReturn Value:
NoError: OK
others: Error code, refer to 7000W31.H.
22
5.15 VC I7000 Demo Programs
z Demo20 :I7000_AnalogIn demo1
z Demo21 :I7000_AnalogIn demo2
z Demo22 :I7000_AnalogIn8 demo
z Demo23 :I7000_AnalogOut demo
z Demo24 :I7000_DigitalIn demo
z Demo25 :I7000_DigitalOut demo
z Demo26 :multi-speed demo
z Demo27 :I7000_I7017In8 demo
z Demo28 :I7000_AnalogOutReadBack demo
z Demo29 :I7000_DigitalOutReadBack demo
z Demo30 :I7000_NetworkAnalogIn demo
z Demo31 :I7000_NetworkDigitalIn demo
5.16 I7000.DLL Driver Source
The driver source of I7000.DLL are given as following:
\NAP7000P\W32\I7000\I7000.H :declaration file
\NAP7000P\W32\I7000\I7000.C :program source file
\NAP7000P\W32\I7000\I7000.DEF :definition file
\NAP7000P\W32\I7000\I7000.MAK :VC++ 4.0 make file
\NAP7000P\W32\I7000\UART.LIB :import library of UART.DLL
z Use VC++ 4.0 to make this DLLs
z The I7000.DLL will call UART.DLL, therefore the UART.LIB must be put in the same directory with I7000.MAK
23
6 7000W31.DLL for Windows 3.1
6.1 Open_Com
Description:
This DLL will initialize the COM port. This DLL must be called once before the other DLLs are called to
szCmd: the starting address of the original command string (terminated with 0)
szResult: the starting address of the result string (terminated with 0)
wTimeOut: constant for time-out control, unit = 1ms
wLenT: string length of send-string
wLenR: string length of receive-string
zReturn Value:
NoError : OK
others = Error code, refer to 7000W31.H
27
6.9 VC Demo Programs
A wide variety of demo programs showing the usage of the 7000W31 DLL are provided. The following provides a very
brief description of the demos provided.
z Demo20 :I7000_AnalogIn demo1
z Demo21 :I7000_AnalogIn demo2
z Demo22 :I7000_AnalogIn8 demo
z Demo23 :I7000_AnalogOut demo
z Demo24 :I7000_DigitalIn demo
z Demo25 :I7000_DigitalOut demo
z Demo26 :multi-speed demo
z Demo27 :I7000_I7017In8 demo
z Demo28 :I7000_AnalogOutReadBack demo
z Demo29 :I7000_DigitalOutReadBack demo
z Demo30 :I7000_NetworkAnalogIn demo
z Demo31 :I7000_NetworkDigitalIn demo
6.10 7000W31.DLL Driver Source
The driver source of 7000W31.DLL are given as following: