From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-31-2010 02:31 PM
I am using Labview v7.0 with Fieldpoint v4.0. I have a FP-AI-110 connected to a FP-1000 connected to my laptop via RS-232 cable. The FP-AI-110 has 2 channels in use (Channel 0 is 0-20 mA; Channel 1 is 4-20 mA). I have a VI that will "FP Read" (Float array) and write the data to a text file. Here's my question: I need to perform mathematical manipulations on each channel, so how do I split the channels into different wires so that I can apply different formulas to each channel?
I have tried splitting using the "array to cluster" function to split the channels without success. Even more baffling is that when I put an indicator right after "FP Read," it only outputs the Channel 1 current (i.e., all other values are zero and greyed out when I cycle through the indicators). I know that both channels are being read because the text file I generate shows the currents from Channel 0 and 1.
I am new to Labview so I don't know if this is a simple problem. Any help is greatly appreciated.
Best,
Paul C.
03-31-2010 02:36 PM
Paul,
Can you post a .png image of the part of your vi that is doing the FP Read?
03-31-2010 04:09 PM
Wayne,
Here's the picture you requested. I used an old VI generated by someone who is no longer at my company, so there may be a lot of extraneous stuff that is not needed.
Thanks,
Paul
03-31-2010 06:30 PM
The fieldpoint read is outputting an array. So just use the Index Array function to get at each of the elements. You can expand the function downwards to get at more than one element at a time. You definitely don't want to convert it to a cluster.
I don't understand what you mean by "it only outputs the Channel 1 current (i.e., all other values are zero and greyed out when I cycle through the indicators)". If you are getting data from channels 0 and 1 in the text file, I would expect you to be able to get them on the front panel. Actually I'd expect you to get a value for each channel that is on the module with the unused ones coming out as zero or something. But I don't have a FP in front of me right now to test. Plus since you have LV 7 and some older looking FP functions there, I don't know if they behaved differently then than they do now.
04-01-2010 08:46 AM
Paul,
It looks like your code was originally written in LV6 or earlier? Anyway I'm guessing that the "FP Create Tags" creates an array of channels to be read and the FOR loop is just cranking the array reading a single channel each time through the FOR loop. What confuses things is that the FP Read outputs a 1D array with a single element even when only 1 channel is being read.
LV 7.0 introduced some pretty big changes to how FP reads and writes are done and made this process much easier. Would suggest you start by reading this http://zone.ni.com/devzone/cda/tut/p/id/4616
04-01-2010 09:25 AM
Couple of things to reply. Yes, I am using Labview 7 but a lot of the code that I am using is from a previous VI that was written in an older version of Labview. Unfortunately no one at my company still knows how to use Labview interface.
Ravens Fan:
I've tried using the "Index Array" function before without success (see the block diagram attachment). I've also attached the front panel picture. I put an indicator downstream of the "FP Read" (x*y) and only one value is read (Channel 1) instead of two. Also, "pH (mA)" is associated with element #1 of the index array but gives me the Channel 1 value (instead of Channel 0), and "Temp (mA)" is associated with element #2 of the index array and it reads a big fat zero. I know from the text file I generate that Channel 0 should be reading 17 mA, while Channel 1 should be reading 8.2 mA.
The pH chart (which is downstream of the formula for element #1) bounces up and down from 8.6 to 3.5; this is because the formula is converting both values from "FP Read." So I don't think the "Index Array" function is splitting up the values from "FP Read."
Wayne:
I recently came across the same website you sent me. I was able to create a "FieldPoint IO Point constant" but then when I tried to connect it to "FP Read" I obtain an error. I still have the "FP Refnum" wires, and there is no wire for the "FieldPoint IO Point."
Is there a way to get my FOR loop to read all the channels instead of one? If that were the case, wouldn't my output text file only read 1 channel too? I am able to output all of the channels in my text file.
Thanks again for all of your help.
Paul
04-01-2010 09:27 AM
04-01-2010 10:15 AM
Paul,
I recently came across the same website you sent me. I was able to create a "FieldPoint IO Point constant" but then when I tried to connect it to "FP Read" I obtain an error. I still have the "FP Refnum" wires, and there is no wire for the "FieldPoint IO Point."
Suggest you create a simple test vi to try and read the FP channels. Open a new vi and use the new method outlined in the link I posted and make sure to get the "FP Read" from the pallete.
04-01-2010 10:27 AM
Wayne,
I tried that yesterday too. The "FP Read" function was still missing the "FieldPoint IO Point" wire. I had originally installed Fieldpoint 3.0, then Fieldpoint 4.0 after that. Could it be that for some reason I'm still using the old FieldPoint 3.0? Is there a way to uninstall it?
04-01-2010 10:31 AM
Paul,
It may very well be that FP 4.0 did not install over the 3.0. I think I'd make sure all the FieldPoint stuff was un-installed and then reinstall 4.0.