11-02-2014 12:29 PM
Hello there LV-gurus.
My mission is basically being able to send information one bit at a time and since I have no background knowledge it is a tedious process figuring out how to do so. I'm not asking for complete solutions considering I want to actually learn it, but I am hoping I could get some pointers on what I should read up on or how to make this happen.
At my disposal I have a DAQmx, from which I hope to send binary information (or a digital wave) regulating a component that will basically just pass this information on to another (actually the same for now) DAQmx where I want to decode it back.
What I'm trying to do, but failing to understand how, is more or less this;
Convert ASCII to binary/digital wave. Here I've tried using the string to byte array but I'm having trouble to finding a way to use the values I get in the byte array.
How to incorporate a "start/stop listening" signal before/after sending the information.
I'm certain there is whole bunch of functions/procedures/whatnots I'm completely missing, so any help or friendly nudges in the right direction is much appriciated. My feeble attempts to scan through the plethora of instructions, help texts and posts relating to this matter has left me stumped.
11-02-2014 12:57 PM - edited 11-02-2014 12:57 PM
You cannot send data one bit at a time. The smallest datatype have units of bytes (8 bits). even a boolean takes up 8 bits.
I don't understand the rest of your post. What do you mean by "send". What is the transport mechanism (within the same VI, over ethernet, etc.)? Why do you need to start/stop listening? Who is the master?
11-02-2014 02:50 PM
In this case "send" will essentially be regulating the voltage to a component enabling a light source reaching a photosensitive cell.
I was thinking that the only way I can do this is by decoding whatever information I want to send to binary and sending these "on or off" signals as a square wave. Then my idea was that I needed a start/stop listening "signal" to tell the reciever the message is complete. Doing this within the same VI would be a start, but the end goal is open air commuication between two devices.
Thanks for helping btw.
11-02-2014 03:36 PM
11-02-2014 03:56 PM
Oh, you are right, that makes no sense. The component I was calling a DAQmx is a NI USB-6003. In my mind used to basically turn on or off the light source and on the other end to recieve the information sent.
11-02-2014 04:22 PM
How fast did you want to toggle your digital line? The 6003 only has software timed digital outputs, so it will be putting the data out really slowly.
11-02-2014 05:00 PM
I have to make some research on that, but the goal is to reach the maximum capacity of my components. I thought I could output a square wave through the analog output..
11-02-2014 09:27 PM - edited 11-02-2014 09:33 PM
So is this going to be continuos transmission of a stream of bits that emulate a maintained connection or bursts of data transmission followed by long periods of zeros? Square wave is not really going to be helpful for transmitting data considering the effort required to start/restart/stop the square wave would cause significant slow down, especially if you want to transmit real data and not just varying frequency square waves.
You should simply be able to start off converting your data into a digital waveform then passing that data through a DAQmx Write command (Digital Wfm>1 Chan>1 Samp).
Assuming you want to be able to read this information as well you can simply read the data using a DAQmx Read command configured similarly to compare the output and inputs.
For most of your data configuration set up you will want to have a look around the Waveform -> Digital Wfm
The conversion menu should hold some VIs of interest regarding generating the waveform data.
For the data transmission I would say looking at the "Digital - SW - Timed Output.vi" in the example finder would help a lot.
(Example finder is found under Help -> Find Examples)