spacetoon34 Posted January 14, 2007 Report Share Posted January 14, 2007 Hello, I want to ask how can i deal with two seperate analog input channel, because it say that an error that one of them reserver by other although i specify the first one to CH1 and the second to CH2. how can i solve this problem and i want to ask if i have a digital input from a device but i connect it with analog input channel ,can i get the values of digital (1,0) by comparing the input channel with 2.5 if gratear = 1 and if less = 0 ??????? thanx, Quote Link to comment
alnaimi Posted February 13, 2007 Report Share Posted February 13, 2007 QUOTE(spacetoon34 @ Jan 15 2007, 06:10 AM) Hello,I want to ask how can i deal with two seperate analog input channel, because it say that an error that one of them reserver by other although i specify the first one to CH1 and the second to CH2. how can i solve this problem and i want to ask if i have a digital input from a device but i connect it with analog input channel ,can i get the values of digital (1,0) by comparing the input channel with 2.5 if gratear = 1 and if less = 0 ??????? thanx, you will get the values depend on the value that device support .. Quote Link to comment
LAVA 1.0 Content Posted February 14, 2007 Report Share Posted February 14, 2007 QUOTE(spacetoon34 @ Jan 14 2007, 03:40 PM) Hello,I want to ask how can i deal with two seperate analog input channel, because it say that an error that one of them reserver by other although i specify the first one to CH1 and the second to CH2. how can i solve this problem and i want to ask if i have a digital input from a device but i connect it with analog input channel ,can i get the values of digital (1,0) by comparing the input channel with 2.5 if gratear = 1 and if less = 0 ??????? thanx, There is only one A/D in the card the Channels are multiplexed. If you set up a task in MAX for continuos sampling or even N number of samples, and run that in parrallel with another task, one will get the A/D First and the other will not be able to access it. The answer is to not do continuous sampling do N number and use a semaphore. Use obtain and release before and After read this will allow sharing of the resource. Yes you can use an analog channel to simulate a digital channel, you can even get a boolean output read analog if greater than 2.5 = True. Quote Link to comment
Jeff Plotzke Posted February 14, 2007 Report Share Posted February 14, 2007 QUOTE(van18 @ Feb 13 2007, 08:50 AM) There is only one A/D in the card the Channels are multiplexed. If you set up a task in MAX for continuos sampling or even N number of samples, and run that in parrallel with another task, one will get the A/D First and the other will not be able to access it. The answer is to not do continuous sampling do N number and use a semaphore. Use obtain and release before and After read this will allow sharing of the resource. If you can read both analog channels in the same place of your code, you can put both channels in a DAQmx Task and read them using a DAQmx Read. The task will handle the resources so you won't need to worry about doing the locking yourself (assuming that you're only reading the task in one place). Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.