LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected Data

I have two controllers cRIO 9068 (OS is NI Linux Real-Time) and cRIO 9081 (OS is Phar Lap ETS). They both have the same analog input card NI-9229. They are both viewing the same analog input (Neutral Current Low in the VI file). See attached "Wiring" sketch for details. The attached VI snap shot is shown "VI snap shot". It is set to sample 1000 times per second. The signal (i5th) is 300 hZ. The FFT sample is set to 200. The issues i am seeing are the following:


First, i would think that 1000 samples per second and an FFT sample of 200 the maximum amount of decision it could make it one second would only be 5 (1000/200). However i see the following:

Date Time i5th above setpoint (5th Trip)
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO
11/18/2017 07:33:37 YES
11/18/2017 07:33:37 NO

A lot more than 5 decisions in one second.

 

Second, Even though both controllers are looking at the same point the cRIO 9068 sees all events almost twice as much as the other controller (cRIO 9081). They both have the same VI files complied to them. Why is this happening? How can i troubleshoot why this is happening? 

 

Third, What can I do to filter out this "noise" (if it is that). Looking at the high setpoint and low setpoint (not shown in the VI snap shot). it shows it going to the upper limit, back to normal, than to the lower limit in one second many times. There is no way i believe this analog input is really doing this. Especially since both cRIO do not see the same data.

 

Any input would be appreciated.

Download All
0 Kudos
Message 1 of 4
(2,534 Views)

Hi ff,

 

those two systems seem to read two different analog signals. And you use a lot of network shared variables: is it needed this way?

There also is a race condition in your code...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,501 Views)

They are identical current transformers and the same analog input cards. The two current transformers are looking at the same current going through the main line.

I don't see how it could be a race condition. When i simulate the signal with a sin wave generator I don't get that data. It only happens when I try to measure the real process variable (i.e. the current going through the wire). If it was a race condition why would I see different results on different controllers. I have four of these in service right now. The one controller always gives me almost X2 more than the other controller.

0 Kudos
Message 3 of 4
(2,464 Views)

@x2jfflan wrote:

I don't see how it could be a race condition.


1. Your FFT_Neutral_Current_Low variable is being written to and read from at the same time.  You do not know if you read the latest value or the value from the previous iteration.  That is the definition of a race condition.

 

2. If you have both of these cRIOs on the same network, you could be very well overwriting each other's variables, causing all kinds of weird issues.  Again, this would be a race condition.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,449 Views)