Hi guys,
I'm reworking an existing LabVIEW VI. It's used to measure Dew-Point Temperature, External Temperature etc. In the lab, we have it connected to a MBW373. I'm working from home and can't access the MBW, so I'm trying to simulate the data stream so I can test the VI as if it were connected to the MBW. When running the VI, we input the appropriate COM Port to communicate with the MBW.
I'm using com0com and created a virtual COM Port pair (COM3, COM4). I've tested them with a Python script and they successfully send each other data. Now, I want to create a Python script that would simulate the behavior of the MBW with that COM Port pair.
Let's take the Dew-Point Temperature instance, that's implemented in the working VI. The VI opens the port with the VISA Open function and configures it with the VISA Configure Serial Port. Then it sends the port the command DP? with the Carriage Return Constant appended. After the COM port receives the command it returns a value, that is read inside the VI.
How should I go about writing my virtual MBW? I'm thinking of creating a Python script that takes in the commands from the VI and answers with the appropriate measurement data, using the appropriate MBW syntax. But I'm not exactly sure what to do with my COM Ports. If anyone can help with this, I would greatly appreciate it. Thanks