USB(`s), without resetting a USB already running in an application

advertisement
Q: How do I open an application for each (set) USB(‘s), without resetting a USB already running in an application?
A: Generate individual "cb.cfg" files for each USB. Follow the steps below in order to do this.
1.
2.
3.
4.
Run InstaCal to locate all of your devices and to generate your main “cb.cfg” file.
Locate your “cb.cfg” file in your “c:\mcc” folder
Create a text file for each board in the “cb.cfg” file
In the text files copy the header and the lines “Board #x” to “End Board #x” where x is a numeric. Place the
total number of boards to be accessed by one application into the cb.cfg file.
To do this, copy the header of the cb.cfg file into another file (e.g. cb1.cfg, cb2.cfg, etc.). It should look
similar to below:
File Type: Measurement Computing Configuration
File Format: ASCII
File Version Number: 4
Maximum Number Of Boards: 200
Maximum Number Of Expansion Boards: 128
Current Board: 0
Current Board Type: c01
Board #x
…
End Board #x
(For multi board applications add the other Board #y after this Board #x)
5.
6.
7.
8.
Do this for every board in the configuration file. You will need to do this in order to avoid running into a
problem with another application.
Now in the Form Load of every application, insert the following lines (for VB 6.0, slight modification for
other languages)
ULStat = cbLoadConfig(“cb1.cfg”)
If ULStat <> 0 Then Stop
For your other applications repeat the above line, but change “cb1.cfg” to “cb2.cfg” and so on.
Now execute your application and they should work as long as the application has
cbLoadConfig(“cb1.cfg”) or the like
Important Notes:
1. Do not load the master cb.cfg, if you do load this all of the above will not work.
2. If any of your applications do not use cbLoadConfig() in order to load a specific configuration file and
cb.cfg exists with the boards you do load in other applications this will result in the “Glitch.” Ways around
this include: not running InstaCal after creating of each individual configuration file, making sure all
applications will load a specific “cb.cfg” file.
3. This is all unsupported and undocumented; use this at your own discretion.
Download