Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrading a Labview 8.2 program to newer version, losing Serial/Activex functions

I have inherited a program that runs a custom made application called via an activex node in the VI, which communicates with a flow meter. On the older computers here it runs fine ( they are XP running LV8.2) but I need to move them to new Win7 computers (running LV2013) and the transfer is not working. The VI is no longer opening the port properly and communicating with the meter. If I use the program that the meters came with to first open the port, then close that program and run my VI the VI calls the application properly, retrieves the data, and gives the output, albeit very very slowly.  The way that the flowmeter outputs it's data as far as i can tell is to dump the entire block of information it has. So muddled in "press p for program" strings and "h for help" is the actual flow value, so I am thinking that the reason that the sampling is so slow is that this proprietary program is searching in the read buffer for an identifier then taking the numeric value needed from that. Does this sound reasonable? But what could be causing it to no longer open the comm port properly like it does on the XP machines? Everything else is the same, I am just trying to open it in LV2013, instead of 2006.

 

I have tried to make a straight forward Serial read program, but that also does not open the port properly, and I have to run the flow meter software first to get a readable port. All that program has is the COM setup and a read block and once running does output properly, but it is just dupicating what is on the screen of the flowmeter like the other program does, so I need to sift through that for the flow value if that is the only way to do it.

 

I have probably done a terrible job explaining this, thank you for reading this far, hopefully we can figure it out.

0 Kudos
Message 1 of 9
(4,678 Views)
What version of NI-VISA did you install?
0 Kudos
Message 2 of 9
(4,672 Views)

I think I have the version for LV2013, I still have the 8.2 discs but they cannot be installed on a Win7 system.

 

I have finally solved the serial only option though, and am getting data (sans flow meter program first), but it is so slow, since I have to read the strings, search them for before/after values and then find the number. I also found out I have to query the flwo computer every time with a command if I want the simplest output of Date:Time followed by a new line with Meter #1      2.3332 SCFM . and that repeats. I called the company and the rs232 output  is only intended to duplicate what you see on the screen at a given time/resulting from a command input. So I won't get any sort of output that is just a number unfortunately.

 

Any ideas on how to speed up the data collection? The limited documentation for that proprietary program I mentioned says it samples every 25ms, and does the same search for string values. I tried a 25ms wait on my loop and it was too fast the strings were being cut off and it made it impossible to search them.

0 Kudos
Message 3 of 9
(4,661 Views)
Please post an image of your block diagram. Why are you using ActiveX instead of the VISA serial functions?
0 Kudos
Message 4 of 9
(4,652 Views)

I am new to this program, it had an activex thing written for it way back in 06... good ol legacy systems....

 

I made a program and it works to parse the strings and only update the number, my question is is this the most efficient and speediest way to do so? I had to play around with the time delay to find a value that is fast but does not oversample the buffer.

 

I should add that this will be placed in a larger program and another port/query added for a second flow meter. I spit these out as local variables, and then use them for calculations later in the program. Is this smart or should I just wire things directly?

0 Kudos
Message 5 of 9
(4,647 Views)
I'm posting from my phone. Can you attach the image I asked for?

Fyi, local variables are never preferable over wires.
0 Kudos
Message 6 of 9
(4,640 Views)

Sorry I had to leave my work computer, I'll post it tomorrow morning. Thanks for all your help.

0 Kudos
Message 7 of 9
(4,636 Views)

Attached two vi photos. One is the original, and the other is a change based on some advice i got from the labview programming forum.

Download All
0 Kudos
Message 8 of 9
(4,622 Views)