LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6341 versus 6215

Solved!
Go to solution

I was using a USB 6215 OK. It worked great. However I needed to controll my valves by hardware I/O. I just installed the new USB 6341. I am trying to control 1 line at a time. I am currently sending a binary or hex value to control the valve. It does not act the same way as the USB 6215 DAQ. Does anyone have a simple approch to control one bit at a time. I am not familur as yet with the DAQ USB 6341.

 

Philip

0 Kudos
Message 1 of 10
(4,723 Views)

Put the write function before the start function.  The write function simply writes data to the DAQ card buffers.  The data does not get generated until the start function is called.  So in your code, you were telling the DAQ to write an empty buffer before you filled it with data.  Try reversing the order and see if it works.

 

- tbob

Inventor of the WORM Global
Message 2 of 10
(4,716 Views)

Great feedback. I will try your suggestions.

 

Philip

0 Kudos
Message 3 of 10
(4,710 Views)

 


@tbob wrote:

Put the write function before the start function.  The write function simply writes data to the DAQ card buffers.  The data does not get generated until the start function is called.  So in your code, you were telling the DAQ to write an empty buffer before you filled it with data.  Try reversing the order and see if it works.

 


Sorry, putting the Start Task first is normal. Just look at one of the simple examples such as Write Dig Chan.

 

 

Philip,

 

Explain in detail "It does not act the same way".

Message 4 of 10
(4,695 Views)

I tried to write to port 2. The scope showed the output to be high always. I read from the users manuel that all of the I/O are defaulted to inputs. So I am in the process of  seeing how to change the port from an input to an output.

 

Philip

0 Kudos
Message 5 of 10
(4,683 Views)

The DAQmx Create Channel you have sets the lines/ports to outputs. What do you have in the physical channel control?

Message 6 of 10
(4,676 Views)

I just figured out the problem. I write to the port via the front panel. Then I start the program with the main start button. I am using 1,2,4,8 as line controls. Next is to creat a 4 channel timing sequence.

 

Please ignor the two frames after the main flat file

 

Thank You,

 

Philip

 

0 Kudos
Message 7 of 10
(4,671 Views)
Solution
Accepted by topic author Philip2001

@Dennis Knutson wrote:

 


@tbob wrote:

Put the write function before the start function.  The write function simply writes data to the DAQ card buffers.  The data does not get generated until the start function is called.  So in your code, you were telling the DAQ to write an empty buffer before you filled it with data.  Try reversing the order and see if it works.

 


Sorry, putting the Start Task first is normal. Just look at one of the simple examples such as Write Dig Chan.

 


Normal, maybe, but not always so.  Look at the example called Write Dig Chan-Ext Clk.  It has the write before the start.  I guess it works both ways.  I have always put the write before the start because I have sometimes used external triggers.  That lead me to believe that you have to write to the buffer before you start the task.  I do the same with Analog Outputs also.

- tbob

Inventor of the WORM Global
Message 8 of 10
(4,661 Views)

What you stated does make allot of sense. I need to be aware of this for future projects.

 

Philip

0 Kudos
Message 9 of 10
(4,655 Views)

Necesito ayuda con un equipo USB-6215, existe alguna referencia que haga lo mismo?

I need help with a USB-6215 device, is there a reference that does the same?

0 Kudos
Message 10 of 10
(2,386 Views)