FAQ For ICPDAS DCON (I-7000/8000/87K) series modules [Version 1.0] Warranty All products manufactured by ICPDAS Inc. are warranted against defective materials for a period of one year from the date of delivery to the original purchaser. Warning ICPDAS Inc. assumes no liability for damages consequent to the use of this product. ICPDAS Inc. reserves the right to change this manual at any time without notice. The information furnished by ICPDAS Inc. is believed to be accurate and reliable. However, no responsibility is assumed by ICPDAS Inc. for its use, or for any infringements of patents or other rights of third parties resulting from its use. Copyright Copyright 1997-2003 by ICPDAS Inc and all rights are reserved. Trademark The names are used for identification only and may be registered trademarks of their respective companies. License The user can use, modify and backup this software on a single machine. The user may not reproduce, transfer or distribute this software, or any copy, in whole or in part. FAQ Page : 1
1. FAQ 1.1 I-7000 series modules FAQ Q: How do I compute the checksum? To compute the checksum, follow the steps below: Step 1: checksum=0; Step 2: for all command bytes, the checksum = checksum + command byte Step 3: checksum = checksum & 0xff Step 4: convert thechecksum to ASCII high byte and ASCII low byte For example, Command = $012 [Enter] Checksum = '$'+'0'+'1'+'2' = 0x24+0x30+0x31+0x32 = 0xB7 Checksum & 0xff = 0xB7 Checksum high byte = 'B' Checksum low byte = '7' Command with checksum = $012B7[Enter] Q: When should a repeater be used in as RS-485 Network? A repeater must be used when the network has more than 256 modules, or if the network covers a distance of more then 1.2 Km. FAQ Page : 2
Q: What is the maximum scan rate of an RS-485 Network? The scan rate depends on the RS-232 COM port Baud Rate, Checksum status, numbers of modules, channels, commands to be sent, result strings received and system performance. Parameters used to test the environment. I-7012 module: x 1 Channel: x 1 Baud Rate: 115200 bps Command: #AA(cr)(null) ==> 5 Chars Result: >SDDDDDD(cr) ==> 9 Chars Transmit 1 Char: 1 Start bit + 8 Data bits + 1 Stop bit = 10 bits 1. For each transmision: Command string + Result string = 14 chars = 140 bits 140 (bits/ transmision) / 115200 (bits/sec) = 0.00122 (sec/ transmision) 2. Hardware delay (for each transmision): 1 msec Scan rate: 1/ (0.00122 + 0.001) = 450 (transmision /sec) Estimated scan rate: 450 times/sec maximum. 3. Tested scan rate value: 440 times/sec maximum without system message processing 360 times/sec maximum with system message processing. Note: system message processing allows let the OS to process other tasks. This may reduce the performance of this program. FAQ Page : 3
Q: The AnalogIn8() function returns an error code 12. Error code 12 refers to ResultStrCheckError, which may be casused by the following conditions. Setting the "Input Range" field in the DCON Utility to "T/C J-Type" will cause this error. To correct it, amend the setting to "+/- 2.5v". Setting the "Data Format" field in the DCON Utility to "% of FSR" will cause this error. To correct if, amend the setting to "Engineering Unit". FAQ Page : 4
1.2 MISC FAQ Q: "[LinkerError] Unresolved external 'xxxx_xxxx stdcall' referenced from xxxxxxxxxx " error message when using Borland C ++ Builder Q: "xxxx.obj : error LNK2001: unresolved external symbol "xxxxxxxxxxx" (?xxxxx@@xxxxx) error message with using Microsoft Visual C ++ The code will generate this error message if it references a function, variable, or label that the linker can't find in the libraries and object files it searches. In general, there are two reasons this for error to occur: 1. The code doesn't exist (calls a reference that the symbol is spelled incorrectly or uses the wrong case) 2. The code asks for the wrong thing, which could mean that you are possibly using mixed versions of the libraries some from one version of the product, others from another version). Naming conventions vary between C and C ++, because of the C ++ decoration of external symbols. The different naming conventions may also cause the error message to occur. By causing C ++ to drop name decoration, the extern "C" syntax makes it possible for a C ++ module to share data and routines with other languages. Most DLL files used in our products are written using Microsoft Visual C ++ 4.0/5.0, and use C naming conventions. If your programs use the C ++ syntax, your header file must be amended as follows: #define EXPORTS extern "C" declspec (dllimport) EXPORTS WORD CALLBACK xxxxx_getdriverversion(word *wdriverversion); These declarations allow the complier to use C naming conventions to refer to these functions. You must not change the naming conventions if your code uses C syntax, FAQ Page : 5
meaning that your header file should look like the following: #define EXPORTS EXPORTS WORD CALLBACK xxxxx_getdriverversion(word *wdriverversion); Several of the DLL files used in our products use C ++ naming conventions for particular reasons. In these cases, your program should use C ++ syntax and should must not change the naming conventions, meaning that the header file like the following : #define EXPORTS EXPORTS WORD CALLBACK xxxxx_getdriverversion(word *wdriverversion); We will gradually unify the naming conventions of the DLL files used in our products by using C naming conventions in order to reduce these problems. Note: If you are using Microsoft Visual C++ as your development tool, ensure that you use the parameters -Tc or -TC to force the VC compiler to use C syntax, or use the parameters -Tp or -TP to force the VC compiler to use C ++ syntax. FAQ Page : 6
Q : Why doesn t the ComboBox CHANGE event work in VB? In both Delphi and Borland C++ Builder, the CHANGE event will work correctly when users choose an item. However, In Visual Basic this event only occurs when the user actually keys something in. You should use the CLICK event to perform the same work in Visual Basic. The CLICK event will also work correctly in both Delphi and Borland C++ Builder. Q: How do I avoid triggering multiple TIMER events? If you use the TIMER object in your project, you must ensure that TIMER interval value is appropriate to your program, system and hardware. For example, suppose the TIMER triggers an event to perform an operation, and then triggers another event again to perform the same action prior to the previous operation being completed. This may causes the multiple operations to be called concurrently, which, after a certain period of time, might cause your system to crash due to it being overloaded. To prevent your system from crashing when using the TIMER object, we suggest that you avoid the re-triggering the TIMER event in the following manner: bool bprocessing ; // declare a flag void fastcall TForm1::FormCreate(TObject *Sender) { bprocessing = false; } void fastcall TForm1::Timer1Timer(TObject *Sender) { if (bprocessing == true) return ; // avoid re-trigger else bprocessing = true;...... // if ( somethings wrong ) { //bprocessing = false; // enable the next timer event to begin FAQ Page : 7
//return; //}...... bprocessing = false; // enable the next timer event to begin } Q: "Unable to create process" error message when using Borland C++ Builder and Delphi? This error message will occur when a required.dll file is not present on your system. If you compile your program into an executable file and then attempt to run it. You may get the different error messages similar to the following. Error Title: Error Starting Program Error Message: A required.dll file, XXXX.DLL, was not found. The error message will tell you what.dll files are missing. To solve this problem, you should copy the specified DLL files into the windows System folder, which can usually be found at: C:\Windows\system (for Windows 95/98) or C:\WinNT\System32 (for Windows NT/2000/XP) You should check your Windows settings in order to locate the system folder. FAQ Page : 8
2. Problems Report Technical support is available at no charge. The best way to report problems is send electronic mail to service@icpdas.com When reporting problems, please include the following information: 1. Is the problem reproducible? If so, how? 2. What kind and version of Platform are you using? For example, Windows 3.1, Windows for Workgroups, Windows NT 4.0, etc. 3. What kinds of our products are you using? Please see the product's manual. 4. If a dialog box with an error message was displayed, please include the full text of the dialog box, including the text in the title bar. 5. If the problem involves other programs or hardware devices, what devices or version of the failing programs do you use? 6. Other comments relative to this problem or any suggestions will be welcomed. After we had received your comments, we will take about two business days to test the problems that you have reported. And then we will reply it as soon as possible to you. Please check that we had received your comments? And please keep in contact with us. E-mail: service@icpdas.com icpdas@ms8.hinet.net Web site: http://www.icpdas.com.tw FAQ Page : 9