12-05-2011 05:28 AM
Good morning everyone,
I have been given a task that requires me to collect analog voltages from multiple channels in signal express before outputting this data onto the serial port of the computer. My programming experience is extremely limited as Im working on the back of high school before I go to university and although I have the basic labview fundementals tied down, Im struggling to understand how to tackle this.
I have started by looking at the basic serial read and write vi provided in the examples and I know how to get labview vi's to intergrate with signal express, but due to my lack of knowledge surrounding the use of communicaiton strings, binary, hexdecimal and asqui I don't really know where to go from here. The writing and reading of strings for example, I do not understand.
I would like the data to ideally be output on the serial port in real time and the the data is being collected continuously at 6khz.
I realise that there is probably no simple answer to this question given my lack of knowledge, but any help would be greatly appreciated!
Thanks!
Harry
Solved! Go to Solution.
12-05-2011 08:02 AM
It's ASCII, not "asqui". I have no idea where you got "asqui" from. The strings you send are completely dependent on what you are talking to. For most instruments you send a string that corresponds to a command that is human-readable. Instruments that were not made in the stone age use the SCPI protocol, which is something like :SOUR:VOLT:AMP 3.1V. That's fairly easy to understand that you want to set the voltage amplitude to 3.1 Volts. Some instruments you need to send byte commands. Thus, the hex value of 0x05 may tell the instrument that you want to set the voltage. Again, it's completely dependent on what you are talking to. What are you talking to?
As for the rate: not going to happen. With operating systems like Windows, Linux, and Mac you cannot create a loop that will operate at a known, fixed speed. That's because these operating systems are pre-emptive (look it up). For that kind of speed you'd need to use a real-time operating system and LabVIEW Real-Time.
12-05-2011 09:34 AM
Hi,
Thanks for getting back to me so quickly.
Sorry, my mistake with the spelling of ASCII, I don't know why I spelt it like that.
I've been given some pretty sketchy details surrounding this task I've been set. I know that I need to collect multiple anolog voltages in signal express and then output them on the serial port of my computer in real time. I think the intention is to then feed this data through a serial cable into a dspace box so that the data can be used in dspace.
So, if im simply trying to send the data that is being collected in signal express out of the serial port to the dspace box, does this mean I need to establish what string commands to send to the dspace box?
Thanks
12-06-2011 08:19 AM
Don't know. I have no idea what a "dspace box" is. It is some sort of time-travel device from a Doctor Who episode?
12-06-2011 08:20 AM
Hi hcook,
As smercurio_fc said, the strings you send are completely dependent on what you are talking to. I have not used a "dspace box" before, but a normal serial device will be expecting specific commands to be received. Once it receives a certain command, it will carry out a certain task. You are correct in saying that you need to establish what string commands to send to the dspace box.
You may find these helpful:
Serial Communication General Concepts
Serial Communication Overview
Hope this helps.
12-11-2011 08:58 AM
Hi Lewis,
Thank you for the links, I will look into them and try and establish what string commands I will need to communicate with the dspace box.
Many thanks