medlines- the Med Associates email newsletter

   Volume 1. Issue 2: June 2007

med-associates.com
 

In this Issue


  Questions from the Field


Trans IV

For some people, Trans IV is a mysterious program you have to run before using your new Med State Notation (MSN) files to control experiments in MED PC IV.  Some folks mistakenly pronounce the name to this application as “Trans Eye-Vee”.  It’s actually pronounced “Trans Four” just like MED PC IV is “MED PC Four.”  So what is Trans IV used for?

Trans IV is a software utility that translates the text in your MSN file into computer source code and then compiles the source code into an executable program that the computer can understand and use to control your experimental apparatus.

Understanding the various functions of Trans IV can make life much easier when it comes to managing your MSN files (*.MPC).  You can take advantage of the capabilities of Trans IV to limit the number of MSN files that show up when starting experiments to a manageable number.  A few examples of how Trans IV can be used to manage your MSN files are discussed below.

Q: What is the difference between the MAKE, BUILD, NO TRANS, and EXCLUDE options in Trans IV?

In Trans IV when you go to "Translate | Translate and Compile" it presents the user with a screen that is similar to the following:

In the Dialog Box there is a list of all the .MPC files located in the "C:\MED-PC IV\MPC" folder.  Some users may have dozens of MPC files stored in this directory, with each MPC file representing a specific experimental procedure.  To the right of each available MPC file there is one of four letters M, B, N, or X.

The M notation indicates that a MAKE operation will be performed on the file.  MAKE indicates that the software will automatically decide whether or not the .MPC file needs to be translated and compiled.  So if Trans IV cannot find a compiled version of the file A926FREQ.MPC or finds that the compiled version is older than the date of the .MPC file, it will automatically compile the program.  MAKE is the recommended setting for normal use.

Newer versions of Trans IV (version 4.1.29 or later, which first shipped with MED-PC
IV version 4.1.36) will recompile any program with the MAKE option selected when it finds that the date on the BACKPROC.PAS file, the USER.PAS file, or the .MPC file is newer than the compiled versions.  Older versions of Trans IV would only recompile the program if it finds that the date of the .MPC file has changed.

The B notation indicates that a BUILD operation will be performed on the .MPC file.  The BUILD operation will always recompile the .MPC file even if no changes have been made.  The BUILD operation will also recompile the USER.PAS file and the BACKPROC.PAS file, even if no changes have been made to those files.  Generally the BUILD option should only be used when additional functions have been added to either the USER.PAS and/or the BACKPROC.PAS files.

The N notation indicates that NO TRANS has been selected and that the file should not be translated or compiled.  When Trans IV translates files, the presence of errors in ANY of the translated files prevents compilation of all other programs that were selected for translation using either the MAKE or BUILD operations.  If you have some .MPC files with errors that are interfering with translation and compilation of another .MPC program that you intend to run, it is often convenient to mark the file(s) with errors with the N operation.  This will prevent the file(s) with errors from interfering with translation and compilation of your .MPC file of interest.

The X notation indicates that the EXCLUDE option has been selected.  This means that the .MPC file will not be translated or compiled and it will not be available for MED-PC IV Users to run.  One reason to select the EXCLUDE option is to reduce the number of programs that are listed when MED-PC IV is running.  Reducing the number of programs that are available in the run-time screen can help prevent the wrong program from being selected and run by mistake.  This is a great way to limit the MPC files that are available to those you are currently working with.  Note that excluding a file from being translated/compiled does not delete the .MPC file.  The .MPC file will still be in the "C:\MED-PC IV\MPC" folder, and can be translated/compiled at a future time when you intend to resume working with that file.