LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Hex Digital Pulse Train with Clock from 6031E

Thank for any help you may provide.

We have constructed a test stand to automate a procedure for a circuit board. A certain chip on this circuit board requires three things: 

1. a clock

2. a hex data stream

3. a set bit


We have managed to create these three things, but not with the functionality we are looking for. We need a better was to set a clock with 16 9ms pulses, the ability to send 18h over a pulsed waveform, and be able to set triggers and timing so that the data is sent at proper intervals. Below we have provided a description of our current solution, our VI and photos of the ideal and what we are actually producing. 

Our attempted solution:

1. Clock - using DAQ assistant to set up the CTR 0 Out line, we are able to send the 9ms pulses we desire. Full scale we need to be able to create 288ms divided into 16 9ms pulses (a picture is provided, the clock is the blue signal). This will allow us to trigger off of certain edges of our clock.

2. HEX data - We need to send 18 HEX along a pulse. The manual system we have to do this has 14 bits that can be toggled high and low. We recreated this setup using 14 individual DAQ assistants with toggle switches to create our pulse (00011000 or 18h). Unfortunately, the signal we are producing does not match the signal we want. This convoluted way of producing this signal does not seem right and we were looking for some guidance. The data pulse needs to start on the first leading edge of the clock and end on the last (16th) leading edge of the clock.

3. Set bit - The set bit needs to occur on the falling edge of the 16th pulse on the clock. It will be set as a low. We are using DAQ assistant on port0/line1 to toggle this bit high or low, but don't know what to sync if with our clock. 

Assuming we are producing our clock properly, what is a better way to send our HEX data? And how do we sync that data with our clock?

Thanks again,

Kyle

0 Kudos
Message 1 of 3
(2,636 Views)

Do a Web search for "Learn 10 Functions in NI-DAQmx and ..." (I think the rest of the title is "Solve 80% of your Data Acquisition Tasks").  Read it.

 

Now go through your code and delete all of the DAQ Assistants.

 

Learn about Digital Outputs.  You should be able to give it an array of bits and have it spit them out at a given clock rate (I haven't done this, myself, as I'm not doing pulse trains, but am reasoning with analogy to other DAQmx Analog and Digital "general principles").  Note that if you have an integer (say a U16), it is easy to convert it to an array of Booleans = array of bits.

 

Redesign your project with this new knowledge and learning.  It should work the first or second time, it should be much easier to understand, and it should be fast.

 

Bob Schor

0 Kudos
Message 2 of 3
(2,566 Views)

 I am not sure fi the 6031 supported buffered DIO. If is does you can just write the entire I/O bit patterns with clock and  control line and sync the output to a clock on the 6031.

 

If it does not support buffered DIO then you will have to write each bit pattern one at a time at 111Hz which under Windows will not be deterministic unless you use a Timed Loop that uses a hardware clock. Then maybe...

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(2,563 Views)