FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the function of the FP Write VI?

Hello, I'm currently a beginner getting familiar with LabVIEW. I'm trying to learn to utilize FieldPoint hardware and I came across the FP Write VI.

 

I'm wondering what exactly is the function of this VI in the context of using it with a PID controller. Is it reading the signals sent by the FP hardware, or is it telling the hardware to do something?

 

If someone could provide a simple explanation, I would be very grateful. 

0 Kudos
Message 1 of 10
(7,156 Views)

It is telling an output card to output something.  Voltage on an analog voltage output module, or current on a analog current out, or a voltage on a digital output module.

 

FP Read reads the signals coming into fieldpoint input modules.

Message 2 of 10
(7,143 Views)

Thanks for the brief explanation, appreciate it very much. 

 

So just to get it straight, say I was using a PID controller for something, like voltage. I would use FP Read to read the voltage signals coming from my module, then I would apply my PID control algorithm to set the voltage coming in closer to my setpoint. And lastly, I would wire the output from my PID control algorithm and use FP Write to write that output back to my module. 

 

Does that seem correct?

0 Kudos
Message 3 of 10
(7,125 Views)

Yes.  An FP Read would read an analog input module to get the current value of whatever it is you are trying to control.  Also know out PV or process value.  Your PID algorithm uses the gain values (P proportional, I Integral, and D derivative) to determine what the output needs to be to try to bring the PV closer to the SV which is your Setpoint Value.  The difference between PV and SV is known as the error. The PID loop gives an output value which is often abbreviated as MV for manipulated value.  That is what you use FP write for to send out of an analog output module.

 

Remember to account for scale factors.  The MV value may be something like percentage valve opening, or motor speed in RPM.  But the output you write to the analog output module will be something like 0-5 V, 0-10V, or 4-20 mA.

Message 4 of 10
(7,122 Views)

Awesome, thank you very much!

0 Kudos
Message 5 of 10
(7,117 Views)

Hi RavensFan, if you don't mind, I had another question about FP Write. 

 

What if this function is used in a situation like the image attached, except with no error wires. So the only things attached to the FP Write VI are the boolean constant and the FieldPoint terminal. If I understand correctly, we are not really telling the FP Write to output anything in this situation, so what exactly happens then? 

0 Kudos
Message 6 of 10
(7,111 Views)

LEDA is a digital output.  It is writing something out.  You are telling it to turn on.  Maybe somewhere else in the program is another FP Write with a False where you turn it off.

 

You don't necessarily need error wires.  Error wires give you an order of execution if needed.  Or to handle any errors that may arise (such as a bad I/O point reference that doesn't exist, so that your code doesn't halt.

0 Kudos
Message 7 of 10
(7,107 Views)

Hi RavensFan, I understand that with the boolean you are telling FP Write to turn on and off, but I'm still confused as to exactly what FP Write is outputting to the FP module when that happens.  

 

I'm working on analyzing a file that is using a PID temperature controller, for which I have attached two images.

 

I'm working on my laptop at the moment where I don't have the PID toolkit, but the VI on the left is a simple PID.vi and the VI on the right is FP Write. When the sequence structure in the true case is run, it tells FP Write to turn on, then waits a certain period of time before telling FP Write to turn off. But what exactly is FP Write outputting in that period? I haven't connected the output of the PID.vi to FP Write so what is it doing?

 

I'm not sure if I'm explaining myself correctly, but please let me know what you think. 

Download All
0 Kudos
Message 8 of 10
(7,093 Views)

It's a digital output.  Writing a True tells it to turn on or output +5V.  Writing a False tells it to turn off or output 0V.

 

You may want to take some tutorials on general data acquisition to become more familiar.  While these are fieldpoint modules and not regular data acqusition cards and thus use different drivers, the principles of analog input and output, and digital and output still apply.

0 Kudos
Message 9 of 10
(7,087 Views)

Okay, will do. Thanks for everything!

0 Kudos
Message 10 of 10
(7,076 Views)