08-25-2017 01:38 AM
hello sir,
can anyone suggest me how to do my logic in labview.
i want to read the DO channels whichever goes high and corresponding analog value is to be noted from the FPGA reference ,
both the DO channel nos and corresponding pressure (analog input) value is to be write in a file when save button is pressed.
screen shots are attached below.
Digital outputs are Load-1,2,3,4,5 solenoids and AI is pressure.
08-25-2017 02:33 AM - edited 08-25-2017 02:36 AM
Hi uma,
I guess those images are taken from the RT part of your RIO project…
i want to read the DO channels whichever goes high
How do you read DO (= output) channels? Usually you only write to DO channels…
Why don't you use the wire going into the "FPGA write control" node? Here you know the current (requested) state of the DO channels! (You don't need to read and write the very same FPGA control in the same iteration of the loop!)
To detect rising edges in boolean signals you usually compare current state with previous one:
rising edge := current AND NOT(previous) or when you aren't used to boolean logic: rising edge := current > previous
corresponding pressure (analog input)
Which one is a "corresponding pressure" when there is only one AI channel used?
08-25-2017 03:19 AM
Dear GerdW,
re:
corresponding pressure (analog input)
Which one is a "corresponding pressure" when there is only one AI channel used?
in that one AI channel(pressure),
if different load solenoid is on ,different pressure will be indicated in the real time.
for eg,
if i switch on(solenoid) load-1,2 - pressure will be 80 bar,
if i switch on (solenoid)load 1,2,3 - pressure will be 60 bar ,
if i switch on load 1 -5 (solenoids)(all) - pressure indicated will be 10 bar( minimal).
so i want to save which ever solenoid (DO) is on when particular pressure value is indicated in the analog input .
08-25-2017 03:24 AM
iam trying the same in event structure such that when save button is pressed the DO,s on and AI value should be saved.
08-25-2017 03:38 AM
Dear GerdW,
Re:
want to read the DO channels whichever goes high
How do you read DO (= output) channels? Usually you only write to DO channels…
sorry i mean it wrongly in words .
we can only write to analog or digital outputs and read from analog or digital inputs.
what i exactly tried to communicate in those lines are, i want to know or read the status of the DO boolean (i.e. load solenoids) whichever is selected and i want to save the channel numbers of the DO whichever is on.
08-25-2017 04:32 AM
Hi uma,
so i want to save which ever solenoid (DO) is on when particular pressure value is indicated in the analog input .
Make your VI run continuously by having a loop set to iterate at a certain rate!
Save the current state of the DO channels and the currently measured pressure value into a file.
08-25-2017 06:29 AM
Dear GerdW,
i am trying to do the same what you have suggested and let you know once it is done.
thanks for your reply.
08-28-2017 12:49 AM
Hello GerdW,
i have done the logic as you suggested and hope it will work ,after deploying the code i will let u know how it works!
iam attaching the screenshot of it.
08-28-2017 01:05 AM
08-28-2017 01:45 AM
Hi gerdW,
iam using the FGV as a subvi in main VI and i think the path to be initialized .
if any error comes while deploying i will let you know.thanks for your reply.