11-19-2014 08:38 AM
I have two following questions:
Q1: I have two SubVIs inside a While loop. SubVI "A" and SubVI "B". I want to connect SubVI "A" with SubVI "B". SubVI "A" has output 1D array of long and SubVI "B" has input cluster of 3 elements (Please see attach image). Can any body guide me how to do this?
Q2: SubVi "B" has output in the form of double precision and since it is inside While loop its value is continously changing. I want to save all its values. Can any body guide me what should I do so that all values generated by the double precison output can be saved in a txt or spreadsheet form?
Regards
JK
11-19-2014 08:51 AM
@josephkirmani wrote:
Q2: SubVi "B" has output in the form of double precision and since it is inside While loop its value is continously changing. I want to save all its values. Can any body guide me what should I do so that all values generated by the double precison output can be saved in a txt or spreadsheet form?
Post your VI of what you have attempted so far.
11-19-2014 09:25 AM
@josephkirmani wrote:
I have two following questions:
Q1: I have two SubVIs inside a While loop. SubVI "A" and SubVI "B". I want to connect SubVI "A" with SubVI "B". SubVI "A" has output 1D array of long and SubVI "B" has input cluster of 3 elements (Please see attach image). Can any body guide me how to do this?
Q2: SubVi "B" has output in the form of double precision and since it is inside While loop its value is continously changing. I want to save all its values. Can any body guide me what should I do so that all values generated by the double precison output can be saved in a txt or spreadsheet form?
Q1: What is the format of your cluster?
Q2: Look in the File IO palette. You will want to open/create the file before you look, write the data inside the loop, and close the file after your loop. If you watn to save the data to a tex file, then you will need to format the data into a string and then write to a text file.
11-19-2014 10:04 AM
Beyond that here is my advice. An understanding of what the data represents is important, and knowing this will likely answer your question for you.
Lets say you have a single analog reading of 5 volts. This is a scalar double. Now you want to graph it so you grab the Waveform Graph and put it on the front panel. But when you wire your 5V reading to the graph it says you need to provide a 1D array. This makes sense when you realize the graph is intended to display many values at once, not just one value. This is why it wants an array of values to put on the graph all at once.
This example doesn't fit exactly in what you are doing. But my point is that if you know what your data represents, putting in into the format needed will become obvious. Lets say you connected an array of data points. That array can change size, it is (practically) and unlimited size from 0 to infinite elements. Now you are wiring it to a cluster of three elements. What are these three elements? Are they a string "Computer Name" a string "User Name" and a numeric "Voltage" well then that tells you te type of data it needs. So convert your 1D array of numbers into those 3 elements. How? Well that depends on what the data is and what it represents. This is information that only you can know. Posting those subVIs will help us, but still you should know what the output of A is and what it represents, and the inputs B wants and what it represents.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-19-2014 12:43 PM
My VI is attached below:
11-19-2014 12:51 PM
You didn't include any of the required subVIs.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-19-2014 01:23 PM
ALL SubVIs are included.
11-19-2014 01:50 PM
Still missing a subVI (subDCOffset.vi).
But from what I could figure, you need to convert the read data into complex data type. Somewhere in your documentation for the unit you are trying to test or communicate with, there should be a definition of how to convert the binary words you captured into this complex data type. This usually involves a gain and offset.
11-19-2014 02:18 PM
Added