Hi everybody,
I have worked with Labview for a long time, but still a newbie for LabView
Real Time System. I tried to use the normal programming concepts to
implement my first RT application, but I met some roblems.
1. Data(Events) missing
I set the time of control loop cycle as 100 us (10kHz), and more than 2
processes should be executed each time one by one , e.g.
Process A: read analog input values
Process B: compare the new value with the old ones, and find the max. and
min.
Process C: insert the new value to the shared variable (array)
But it does not work at all. For example, the cycle should have be executed
for 10 times, but fininally I found that B and C were only executed once or
not executed at all(because the max. and min. values were both same to the
first analog input value, and the array was empty). I don't think there is
some logical errors, because it worked well, if I set a probe after A to
show diagram of the analog inputs (maybe the probe works here just as a
delay).
2. Shared variables updated slowly.
In fact I have two control loops in Real Time System for measuring (one is
10kHz and the other is 100Hz), and on the other side the PC shows the
results every 100 ms or faster.The data should be transfered between 2
control loops and also between PC and Real Time Sysem via share variables,
but I found the variables can not be updated always in time.
For example: In one loop the share variable ( array of double) should be
initialised ( empty it ) , then inserts some values in the variable. But I
found that some times this variable hat some old values which should have
been removed by the last initialisation, and sometimes the same variable
shows diffierent value on PC from it on RT.
I don't have any experiences with Real Time Systems, so I don't know what I
should do and what I shouldn't do in RT, could someone tell me where my
problems are?
Thanks a lot!
Le