Hi Zhouzhou,
If you use the firmware in the beta branch of the repository and the MATLAB class in the same branch, you can initialize 2 objects (1 for each Pulse Pal) from the MATLAB command line as:
PulsePalA = PulsePalObject('COM3');
PulsePalB = PulsePalObject('COM4');
You'd then call the methods and change the fields of PulsePalA and , to control each device.
As a workaround with your current setup, you may (depending on many things) be able to run a second Pulse Pal from second instance of MATLAB. In that case, call:
PulsePal('COM3')
from the command line of the first instance, and
PulsePal('COM4')
from the command line of the second.
Of course, if you need both to be coordinated as part of a single experiment, this won't be practical.
-Josh