08-14-2023 09:37 AM
Hi everyone,
I am currently working on connecting a second dual channel syringe pump to my existing LabVIEW code. In my code, I am using the communication settings [x]
to control my pump (ej channel 1, channel 2, single pump etc.). I want to connect a second pump by adding a COM port, baud rate, [x], and mode. I am new to LabVIEW and I don't know how to connect a new communication setting to my existing code. Can someone please help me? I have been able to get both pumps to work at the same time by opening the same script in two windows and using a different COM port in each window. However, my goal is to be able to control both pumps from one window.
Any help would be greatly appreciated.
Thanks,
08-14-2023 09:47 AM
First you should be aware of LabVIEW Basics to understand the existing Module and Modify to adopt additional UUT/Device.
You can duplicate the cases (Initialize COM1,Start COM1,Send SettingsCOM1. StopCOM1,PauseCOM1,etc., to COM2 as well)
Add the Front panel elements and Buttons for the New UUT and Handle the button events to call the additional COMPORT device
08-14-2023 09:51 AM
Thanks for your fast response. I have already tried that, but the problem is that once I duplicate the whole module and connect it to the loop it would run but both pumps won't work.
08-14-2023 09:57 AM - edited 08-14-2023 09:58 AM
You cannot just duplicate the whole loop, handle the cases and Events inside the Loop.
1.Edit the State Typedef and add new States.
2.Add cases for the new States.
3.Add Front panel Elements for additional Device.
4. Handle events for new Front panel Buttons.
Try this and share the modified code here, so that others can guide you if any issues on the modified one.
08-14-2023 10:03 AM
what exactly do you mean by Edit the State Typedef and add new States? im kinda confused.
08-15-2023 09:24 AM
okay,
so this is what i have so far.