Discussion:
USB-6501 Application
(too old to reply)
RDD
2008-05-11 20:40:05 UTC
Permalink
I am using the USB-6501 24 Channel I/O device in an application to fire 20 individual solenoids (through solid state relays).  The solenoids fire determined by the output of a machine vision pass / fail criteria.  Prior to starting the process, I want to fire all 20 solenoids one at at time to verify operation as a diagnostic check.
 
I am attempting to use a "For Loop" which will cycle 20 times with a 1/2 second duration between solenoids.  My problem is how to increment the port values of the USB-6501 after each iteration of the "For Loop".  Any ideas would be appreciated.
 
Regards,
Doug Dunlap
 
Steven C
2008-05-12 22:10:05 UTC
Permalink
Hi Doug, I have prepared a snippet of code that will cycle through your 20 solenoids with a 0.5 second delay between each one. I hope that this helps. Please let me know if you have any questions about it. Best regards,Steven CzerniakTeam Leader - High Precision Product ExpertsApplications Engineering - National Instruments


CycleDigChannelDF.vi:
http://forums.ni.com/attachments/ni/70/8839/1/CycleDigChannelDF.vi
RDD
2008-05-13 15:10:09 UTC
Permalink
Hi Steven,
Thanks for the reply and the sample code.  It does what I need for the diagnostic portion of the process.  I was also cosidering using an array (if it is possible to add I/O line data to an array) of the outputs of the USB-6501 so I can call which ever line I need to be energized for the eject.  I'm still new to the potential of DAQmx so I appreciate your help in pointing me in the right direction.
Doug Dunlap
 
Steven C
2008-05-15 04:40:08 UTC
Permalink
Hi Doug, If by I/O line data, you mean having an array of Physical Channels data type, the yes you certainly can. You would simply need to drop down an array shell and populate it with this data type by dragging it into the shell. When you expand the array to have multiple elements, you can configure them to be the channels you need and access each value using the Index Array function. I hope that this helps. Please let me know if you have any questions. Thanks Doug and have a great day!Best regards,Steven
RDD
2008-05-22 16:40:09 UTC
Permalink
Hi Steven,
The array of physical channels concept working with the index array function works well.  Now the part that I don't understand is why the array contents must be reloaded each time labview is started.  Does the array contents exist in RAM and is gone when Labview is shutdown?  Is there a way to automatically reload the array data from a table each time the VI is restarted?  Thanks again for your support.
Doug Dunlap
 
 
Scott_G
2008-05-23 18:10:06 UTC
Permalink
Hey Doug,
 
It sounds like it is just going back to the default values.  You can change the default values by entering the data you want and then right clicking on the array and selecting Data Operations >> Make current values default.  Then save your program and the data should still be there the next time you open your program.
 
Scott G.

Continue reading on narkive:
Loading...