I need to be able to read from/write to four different serial ports simultaniously.
I'm trying to make a subvi called Tip.vi that handles all the actual writing, reading and parsing of data from a single port. I want to use 4 (instances/copies/whatever) of Tip.vi within a Main.vi.
Main.vi deals with user interactions, data gathering etc. Tip.vi has a string that get's updated with whatever bytes are currently available at the port. I want to keep this string within Tip.vi, not have to pass this to/from Main.vi.
I had all this working great with just one Tip.vi. When I added a second Tip.vi bad things happend.
- if two copies of the same code, named differently, was used, one Tip.vi seemed to keep the second Tip.vi from running enough.
- if just the subvi Tip.vi is made reentrent the strings from different ports would get jumbled together, not stay seperate.
- if the code Tip.vi and all of it's subvi's reentrent still the strings would get jumbled.
- I tried making a template out of Tip.vi (so it's Tip.vit) but it wouldn't instantiate in Main.vi
I recognize that the VISA Read used in every Tip.vi will all happen serially, I can't figure out how to make VISA Read reentrenet.
I give up. How can I read/write to two ports simultaniously. Some sample code would be great.
Thanks very much for the help-
Ariel