05-14-2009 03:57 PM - edited 05-14-2009 04:04 PM
HI Jordan
Thanks for the quick reply. I understood what you are saying and corrected the error, however there is one more problem i am facing. I have a CB-68LP accessory connected to the 6251 which I am using for the ouput signal. I am only able to get an output on port0 line0. If I change the output line to anything else, for example port0 line 1, then the program runs but there is no output signal. I checked this using an oscilloscope. Can the counters ( 0&1) be used as sample clock for only one specific digital ouput (port0line0) ?
The objective of this whole excercise is that i could have one valve that is controlled through one digital line and another valve that is controlled through second line. Do you have any ideas on how i could do this ?
( my vi is attached)
Regards
Abhishek05-14-2009 04:23 PM
Also
If i use MAX and then toggle the di switch(in this case port0line1-image attached) i get an output, but not from within the program.
05-15-2009 01:34 PM
The reason why you are not seeing any change on line 1 for this program is because you are writing a 1,0 to the digital port (the array input). So, in 8 bit binary a 1 represents 00000001 and 0 represents 00000000. So, you change the line you are writing to in the program but it only means that you are physically updating that specific line. Since, 1,0 is written, line 2 will always be zero according to the corresponding binary value. To write to line 1 you need to write a 2 in the array (instead of one). This is because 2 represents 00000010 (so line 1 will have a high value). I attached a screenshot of what I mean. I understand this may be kind of confusing...
05-18-2009 02:33 PM
Understood and implemented.
Thanks!