LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to program a simple relay ON/OFF manually?

Solved!
Go to solution

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.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 11 of 30
(1,326 Views)

 


@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.

 

0 Kudos
Message 12 of 30
(1,316 Views)

 


@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. Smiley Sad

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 13 of 30
(1,307 Views)

Here's a KB article but with a link to a private AE domain.

0 Kudos
Message 14 of 30
(1,303 Views)

@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...

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 15 of 30
(1,293 Views)

 


@CrackJack wrote:

@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...


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.

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 16 of 30
(1,286 Views)

 


@Dennis Knutson wrote:

Here's a KB article but with a link to a private AE domain.


 

Internal channel access.  Interesting! 

Thanks Dennis.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 17 of 30
(1,277 Views)

 


@NIquist wrote:

 


@CrackJack wrote:

@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...


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

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 18 of 30
(1,266 Views)

 


@CrackJack wrote:

@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...


Did you add an error indicator inside your loop?

 

0 Kudos
Message 19 of 30
(1,264 Views)

 


@Dennis Knutson wrote:

 


@CrackJack wrote:

@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...


Did you add an error indicator inside your loop?

 


Yes, I did, and no errors are observed....

 

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 20 of 30
(1,259 Views)