The problem may be steming from the fact you don have a delay. In the main vi, put the different diode_cntr2.vi each in a sequence, put a delay of 500 ms or whatever works at the end of execution of each call
Currently, once a the vi finishes one diode, it starts another call immediately for another diode. But since it is the same serial port is being used, data are getting overwritten and corrupted before the device takes it.
In debug mode (ligyht bulb) mode, a delay is created which accounts for the fact the vi works.
also in the diode cntr2.vi while loops, put a small delay of 100 ms or less whatever appropriate