I would like to load eight different COM ports as serial objects and send strings to these serial objects simultaneously. These COM ports represent micromanipulators which I can tell to move to certain xyz coordinates.
Right now I initiate them using these lines:
Afterwards I would like to adress all (or only some which I select through a checkbox GUI) serial objects with these lines:
I could write 8 if loops and leave everything as is, but I have a feeling that there should be a better and shorter solution? Is there a way to store the serial objects in some kind of array or anything like that so I can adress the serial objects with a for loop? Apparantly I can not store them in an array, because then this happens:
Cell contents assignment to a non-cell array object.
I would appreciate your help.