09-19-2013 07:04 AM
Hello, wolrd, another problem im stuck with here it goes: now that i managed, with the help of good people from here, to successfully transmit a desired voltage value to a servovalve, i need to organise an input which in my case are two pressure sensors: one of them is set up before the valve, another one is after, so i connected them to two input channels, ai0 and ai1, and created two waveform charts to see the voltage on sensors. the problem occured is ridiculous: i have three loops: output(servovalve voltage) and two input loops for both sensors, where i added two charts, but when i run the program, one of the input charts never works, so i decided to do the following: i switched both charts to show the data from one channel, e.g. ai0, and its quite logic that they have to show the same waveforms, haha no way, on of them is always frozen. which of them? randomly. and i thought of a following thing: it actually looks like the fastest to access waveform chart works, another loses the race and stands frozen. what could be wrong? i carried out a couple of tests, and it occurs that a problem is not with the connection, neither it is with the sensors. any thoughts on this? thank you 🙂
p.s. vi attached 🙂
Solved! Go to Solution.
09-19-2013 07:24 AM
You simply cannot create two separate tasks for the analog input. This is a common mistake for beginners and I'm sure you are getting an error message but ignoring it. You need to have a single loop and both channels defined for a single taqsk.
09-19-2013 08:26 AM
Hey, Dennis
no, i do not recieve any errors, otherwise i wouldve mentioned it 🙂
how do i define two channels for one task? by simply connecting the wires of tasks together? Thanks in advance 🙂
09-19-2013 11:42 AM
10-07-2013 01:59 AM - edited 10-07-2013 02:03 AM
well did as you said, so now i have two input channels wired in a sequence and now only one waveform chart, which is supposed to display data from both sensors. ok, ill solve the problem of two data flows on one chart, but it still wouldnt work, no data comes to input, what might be the problem? thank you
diagram attached in jpeg
10-07-2013 02:09 AM
sorry, solved everything by just setting read to N channels, thank you 🙂