07-28-2020 03:23 PM
Can you post what you have so far? The actual VI not a picture.
07-28-2020 03:41 PM
Okay I was not able to get it to work and I am so confused now. I have never dealt with this and have not learned labVIEW and I think I just made a mess out of this. I have attached VI file. Please help me with this.
07-28-2020 04:32 PM - edited 07-28-2020 04:33 PM
What are you confused about specifically?
The basics of serial communication are to have the port settings match on both devices that are trying to communicate. IE baud rate, data bits, parity and stop bits. This just ensures that both devices are speaking the same language. You also need to know how much data is being sent. Luckily it looks like both your devices use a termination character. When you specify a termination character, the VISA Read function will automatically return all the data up to and (I believe) including that character. The Honeywell manual states that it expects a carriage return (13) and it looks like the other device uses the newline character (10). With those configured with the VISA Configure port, VISA read will read until 1 of three conditions is met; the timeout specified is exceeded, the termination character is read, or you read the full bytes wired to the "bytes to read" input. By wiring in a larger than you ever expect to see number of bytes to read, the VISA Read should always either timeout or return data up to the termination character.
Regarding your VI, I got rid of the assistant VI's and replaced it with the basic VISA functions, it should work exactly the same except the Honeywell assistant was configured for a different termination character. You can probe the data coming out of the VISA read and the error wires to see what data and any errors that are occurring are.
You said you were just getting "11" for the data now which makes sense..... kinda. How you parse the data doesn't make much sense to me. There are case structures that look at the length of the data coming from the devices and unless it is specifically 7 or 8 characters long it will return 11??? I don't know what is going on here and without being able to see what kind of response you are getting from the devices, or knowing why that logic is there I can't really say much about it...
07-28-2020 05:14 PM
Sorry about this. I am just confused about the function of each block and which block refers to which block in the physical system. I am completely new to the software and I have never built any block system myself. The VI file I attached in my last post was made by a former lab mate to accommodate a pressure system and we are building a new but same system and are using this same block flow. The same device and instrument are used and theoretically, the same VI file should also work but it does not.
I rally appreciate your help and will look at your file. I will keep you updated.
Thank you so much!
07-28-2020 05:19 PM
No worries. If you want more info on the functions and VI's, pressing Control+H will enable the context help and when you hover your mouse over something a window with more information will appear.
07-29-2020 10:00 AM
Okay, I changed to command of the Honeywell to get pressure based on our lab's previous work and I was able to start running the software without it showing the time-out error but again it just shows 11 for both data sets. I have attached a screenshot of this.
I do not know why they set the length of the input character to be 7 or 8 long; the 11 is there because the maximum pressure our MKS device can go up to is 11 torr. Could you tell me where I can fix this? Thank you!
07-29-2020 11:23 AM - edited 07-29-2020 11:23 AM
This has really gone out of the scope of the original question and without knowing why that "if the length is not 7 or 8 characters long, output 11" is there I can't really give a good answer.
You might also want to consider reading up on LabVIEW basics, there are some great online resources such as this
I will say though I am not 100% convinced that there is no error coming from the serial communication now. I did wire the error cluster through which disables LabVIEWs automatic error handling and assumes that the programmer will deal with any errors. I would start by either creating indicators, or probing the error and data out wires just after the VISA read functions. This will tell you if there are errors and what exactly the data looks like that is coming through if everything is working.
Use the probe tool and click on the wires you want to probe. When you run the program it will show the data from the probes in the probe watch window.
07-29-2020 01:16 PM
Thank you for your suggestion and I did find something.
I used the probe method and looked at the lines you mentioned (screenshot attached). The number labeling is the same as yours. It seems that the Honeywell is able to send out data and there is no error detected but it still shows 11 on the panel. Error was detected on the MKS part and it showed that the device may not be present in the system; this is possible because the MKS cable was connected to the computer using an adapter.
I then looked at the VISA serial port block and looked at its property. In the VISA source drop down menu, there is no COM3, which should be the usb-to-serial port adapter as shown by the device manager. My suspicion is that the adapter may not be working but I am not sure.
Thanks!
07-29-2020 01:27 PM
Okay now i have managed to let the MKS reading show up on the panel so I guess the adapter thing is working
07-29-2020 01:59 PM
Okay now it seems that because the length of the string it comes out of the Honeywell is 9 (line 10) so the panel always shows 11. Any suggestion on how to change it to 7 or 8? Thanks!