09-11-2009 05:04 AM
Hi Smercurio,
I installed portmon and run it. But could not able to access the string output. It showing error 'portmon could not attach to serial 0 - device may be in use'. I checked the help file and tried starting portmon before executing VI. Still I am getting te same error.
Thanks
Senthil
09-11-2009 09:46 AM
You need to start portmon before launching LabVIEW. When you launch portmon it automatically lists the COM ports (by reading the registry), and begins monitoring on the first one. Verify it's monitoring the correct port and change it if it's not.
If you cannot get portmon to work, then use the attached VI. It will save the data captured over the serial port to file without the messy business of carriage return/linefeeds. Just upload the 2 files it creates. You will need to zip them up since the forum doesn't accept .bin files.
I still want to see your VI. Upload it - do not post a screenshot.
09-21-2009 08:05 AM
Hi Smercurio,
Sorry for the long wait. I was out of station. I herewith attached the VI. I have connected the instrument via serial multiplexer. It has 4 serial ports (A,B,C and D) and a Master port. The VI first initializes the master post and activates it. Then Sub-VI's process the serial outputs of corresponding serial ports. Presently, the instrument output is connected to port 'B' and the subVI (RC1DATA) reads the string output from the instrument.
Thanks
Senthil
09-21-2009 09:01 AM
Uploading the top-level VI does not automatiically upload the subVIs - these are separate files. Thus, the actual VI that does the reading is not included. I do not understand why you are using those old VIs. Internally, they are actually wrappers around VISA, so you should be using the VISA functions directly, as they provide error I/O. As it is, you have no way of knowing if an error occurred in any of your serial functions.
Your VI is a basic loop, yet you are initializing the COM ports with each iteration. This is a waste of time. Initialize the port once before the loop starts, and close it once it's done.
Did you try running Portmon before starting LabVIEW? Did you try the VI I sent you?
09-22-2009 05:52 AM
Hi Smercurio,
I have tried using your VI and it displays error code. I attached the file O/P (invidual.bin, fullstring.bin) for your reference. Also attached the screen shot of front panel.
I used portmon and if I select 'COM1' port for capturing, a pop-up window triggers displaying 'port mon could not attach to COM1, the device may be in use'.
Regards,
Senthil
09-22-2009 08:57 AM
You are not being consistent. Your VI's front panel shows that you were using 7 data bits and even parity. At least that's what you had the default values set to for the VI. I can only assume they were set that way because that's the serial port communication. Yet, you did not set the controls on the front panel of my VI to match your serial port settings. Obviously, my VI will then generate an error because the VISA functions will not interpret the data correctly. I have no idea what your serial port settings are - the front panel controls on my VI were set to default values that are typical.
Regarding Portmon: I don't know why you're having so much trouble running this utility, unless something else is using the serial port. Do you have LabVIEW closed at the time you run it? I'm talking about the full application. Do you have any other terminal program running? Are you even able to launch Portmon and connect to your serial port if you start from a reboot WITH NO OTHER APPLICATIONS RUNNING?
09-22-2009 10:03 AM
Hi Smercurio,
I have changed the serial port settings according to my VI specifications. Still I observed same error code and strings of ASCII characters as displayed in my previous post.
As per your suggestion, I disabled all the running parallel programs and started first portmon. Then I executed your VI. Now it seems working! I attached the output of portmon program with this post. Have a look.
Thanks
Senthil
09-22-2009 10:11 AM
09-22-2009 11:21 AM
Hi smercurio,
I attached herewith the portmon output for my VI operating via multiplexer.
Thanks
Senthil
09-22-2009 11:32 AM
Hi Smercurio,
I herewith uploading the sub-VI (RCDATA) which has been used for processing the string read out from serial port read.vi.
Regards,
Senthil