Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set a threshold from an analog signal (4-20ma) coming in on a cfp AI 110, to trigger an alarm on my UI?

I have the alarm set, indicator set,  just need a digital trigger from an analog input. I realize I could use an external switch into a digital input, but would rather use what we have. We are using this analog signal for other purposes as well. This application is for controlling a machine. Thanks.....
0 Kudos
Message 1 of 8
(7,287 Views)

Hi Cheezer,

 

I would like to move this post over to the FieldPoint family board, but something is up with my premissions Smiley Mad so I will attempt to answer your questions here. 

 

How are you getting your alarm conditions? Can you post your code? Since cFP AI 110 does not have a hardware trigger you will have to poll the analog input and then make a software trigger.

 

 

Joshua B.
National Instruments
0 Kudos
Message 2 of 8
(7,260 Views)

Hopefully these have came along as attachments.

This source code was written by 3 different people, all with varying knowledge of Labview, so, if its not the cleanest application you have seen , bear with us.

Thanks again,

Bob

0 Kudos
Message 3 of 8
(7,249 Views)

Hi Chezzer,

 

There is quite a bit in your VIs. It looks like you are already polling plenty of signals. What signal are you needing your needing to threshold for your alarm? Will a case structure and a comparison work well enough? Do you have more specific specifications of what you are needing?

Joshua B.
National Instruments
0 Kudos
Message 4 of 8
(7,231 Views)

Joshua,

it is channel 0 (dispersion level) on all 5 of the analog inputs (1 AI module per address, 5 total).

I have fumbled thru it enough to get an indicator on the front page of the UI, called Dispersion Low, but need to drive the indicator when the analog signal gets down to 7 ma or below (7 is a guess right now, until we get it going and give it an application test).

 

Also, in the alarmsa.vi, I added a timer so when the operator presses the alarm silent button, it goes back to active after 5 minutes.

Is this as straight forward as it appears? Will this accomplish what we are after?

 They (operators) would press this button, address the cause of the error, and the app would then ignore any incoming errors. Problem being they would forget to "release" this button after solving cause of error, and would not notice new errors until physical symptoms appeared.

 

Thank you,

Bob

 

Message Edited by cheezer on 03-11-2009 07:11 AM
0 Kudos
Message 5 of 8
(7,223 Views)

Hi Bob,

 

I found a couple instances of Dispersion Low, I assume you are meaning the indicator on the MixCart-X.vi's. In those VI's you have connected the value output of the FieldPoint VI (0-20 mA) to a Boolean indicator (true or false). This will not work. You will need to create a case structure that tests if the value is below your desired value (7 mA). If true, then write a true constant to the Boolean. If false, write a false constant to the Boolean. Give this a shot and try posting just one of those VIs that you have change if you are needing more help.

 

Also, it feels like you might be a little unsure with some elements of LabVIEW, so I would like to referred you to some online tutorials: https://learn.ni.com/learn/article/labview-tutorial.

Take particular note of the case structure: https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/structures/case-structure.html

 

Let me know how it goes! I'm here to help.

 

Joshua B.
National Instruments
0 Kudos
Message 6 of 8
(7,204 Views)

Joshua,

it had taken a little while before I could get back to this. I am spread quite thin so time is very valuable.

See attached and let me know if this is correct.

Thank you again,

 

Bob

0 Kudos
Message 7 of 8
(7,120 Views)

Hi Bob,

 

The way you have your Case structure setup now is that the “7” case will only get executed if the value from the wire is exactly 7. This same applies to the “8”. Also, there is no default case, so if value does not match any of the cases then your indicator will not change.

 

You indicated earlier that you need the indicator to be ON when the value is below 7mA and OFF when above 7mA. You will want some like this:

 

 

 

Alternatively could just use the Not function inside the Boolean palette to achieve the same functionality without the case structure.

 

Message Edited by DiscoBall on 03-27-2009 12:12 PM
Message Edited by DiscoBall on 03-27-2009 12:13 PM
Joshua B.
National Instruments
0 Kudos
Message 8 of 8
(7,094 Views)