09-07-2010 12:05 PM
In your last example you're trying to write to and read from the same lines. You've set those lines as digital outputs already. If ou want to read (monitor) the ACTUAL physical changes you'll need to set up 4 digilat INPUTS on different lines and then connect a wire (real wire) between the appropriate lines. Reading a line this way will not load it down, it will still fire your relay.
09-07-2010 12:12 PM
@NIquist wrote:
In your last example you're trying to write to and read from the same lines. You've set those lines as digital outputs already. If ou want to read (monitor) the ACTUAL physical changes you'll need to set up 4 digilat INPUTS on different lines and then connect a wire (real wire) between the appropriate lines. Reading a line this way will not load it down, it will still fire your relay.
I don't believe this is true. I've done this before with digital I/O and you can do a read on channels you have configured for a write. I'll try to see where this is documented.
09-07-2010 12:22 PM
@Dennis Knutson wrote:
@NIquist wrote:
In your last example you're trying to write to and read from the same lines. You've set those lines as digital outputs already. If ou want to read (monitor) the ACTUAL physical changes you'll need to set up 4 digilat INPUTS on different lines and then connect a wire (real wire) between the appropriate lines. Reading a line this way will not load it down, it will still fire your relay.
I don't believe this is true. I've done this before with digital I/O and you can do a read on channels you have configured for a write. I'll try to see where this is documented.
I wasn't sure if that would throw an error or not but I wonder if it's actually measuring whether or not the line HAS changed or just that you TOLD it to. In any case, that's why I suggested that the OP just monitor the lines physically with four dedicated input channels. I'd be interested in the documentation. Especiall since a co-worker just stole my USB-6251 so I can't try it out here.
09-07-2010 12:30 PM
Here's a KB article but with a link to a private AE domain.
09-07-2010 12:41 PM
@Dennis,
So the code I have written should work right??? Or I need to make any changes??? Looks like I have done what its mentioned, but I cannot see any
LEDs glowing...
09-07-2010 12:51 PM
@CrackJack wrote:
So the code I have written should work right??? Or I need to make any changes??? Looks like I have done what its mentioned, but I cannot see any
LEDs glowing...
Why not just measure the digital outputs with an external DMM or o-scope? That is the important thing right? If they're toggling properly, you can trust that the boolean controls are indicating the true state of the physical outputs. You can add in the extra monitoring functionality later if you want to.
09-07-2010 01:14 PM
@Dennis Knutson wrote:
Here's a KB article but with a link to a private AE domain.
Internal channel access. Interesting!
Thanks Dennis.
09-07-2010 01:19 PM
@NIquist wrote:
@CrackJack wrote:
So the code I have written should work right??? Or I need to make any changes??? Looks like I have done what its mentioned, but I cannot see any
LEDs glowing...
Why not just measure the digital outputs with an external DMM or o-scope? That is the important thing right? If they're toggling properly, you can trust that the boolean controls are indicating the true state of the physical outputs. You can add in the extra monitoring functionality later if you want to.
Yes, I can... but I have nothing connected to the hardware as of now... Hence, wanted to check...
But I think I will bellieve the toggling of LEDs...
Thanks
09-07-2010 01:20 PM
@CrackJack wrote:
So the code I have written should work right??? Or I need to make any changes??? Looks like I have done what its mentioned, but I cannot see any
LEDs glowing...
Did you add an error indicator inside your loop?
09-07-2010 01:25 PM
@Dennis Knutson wrote:
@CrackJack wrote:
So the code I have written should work right??? Or I need to make any changes??? Looks like I have done what its mentioned, but I cannot see any
LEDs glowing...
Did you add an error indicator inside your loop?
Yes, I did, and no errors are observed....