LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I program labview to read all 8 compact fieldpoint modules?

Solved!
Go to solution

I am new to fieldpoint and have my block diagram set-up to read 8 strain gauges using an SG-140 module.  My backplane is filled with 8 SG-140 strain gauge modules, and I need to know how to fix my block diagram to read all 8 SG-140 modules.  So, I need a total of 64 strain gauge readings using 8 SG-140 modules.  Can I do this without actually copying what I already have done 8 more times?  Is there a way to use a loop or something to make it read the other 7 modules?  I appreciate any help I can get.

 

0 Kudos
Message 1 of 9
(3,927 Views)

You will need to do 8 reads.  But you can do it in a loop.  Create an array of your fieldpoint I/O channels, one for each module.  Then feed that into a For Loop with autoindexing turned on that wraps up a Fieldpoint read.  The output of the loop (also autoindexed) will be a 2-D array where 1 dimension represents the different modules, and the other dimension represents a different channel on each module.

 

By the way, you don't need to copy the Index array function to get different elements of the same array.  If you drag the border of index array downwards, you get more outputs.  You can than wire your 1, 4, and 7 constants to each element index input.

 

0 Kudos
Message 2 of 9
(3,921 Views)

How do you create an array of your fieldpoint I/O channels? I have tried to accomplish it and research it and have not been able to come up with anything.  I am attaching my project again with the changes.  After I made the for loop, I now the following message:

 

These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required. The type of the source is 1-D array of double [64-bit real (~15 digit precision)]. The type of the sink is double [64-bit real (~15 digit precision)].

 

I am not sure if this is because I have not created the array for the fieldpoint, but I am assuming it is not and that I have done something else wrong. 


Also, I have the project set-up to read out to a spreadsheet.  Will it read out all 64 channels at the same time so I get one set of data?

 

Thanks for the information on the index array.  I fixed it.  You probably can tell, I do not have much experience with Labview but I have looked at tutorial and taken the 6 hour getting started and read a lot of postings.

0 Kudos
Message 3 of 9
(3,906 Views)

Sorry I forgot my attachment.

0 Kudos
Message 4 of 9
(3,903 Views)

Drop an array container onto the block diagram, then drop the Fieldpoint I/O inside of that.

 

Since the loop creates a 2-D array, indexing the array gives you 1-D arrays, thus the error.

 

You need to index by row and column to go from a 2-D array to a scalar element.  Alternatively, you might want to reshape the 2-D array to a 1-D array.

 

I still don't understand why you are splitting the array into 3 parts, and then grabbing the same rows (or columns) 1, 4, 7.  I would just index the array once, and split the wires for rows 1, 4, and 7 afterwards.

0 Kudos
Message 5 of 9
(3,897 Views)

It is being split into three parts because there are three rosette strain gauges on each SG-140 module.  Each rosette has three reading (each one reads in a different direction). Currently all each index array represents one rosette strain gauge.  If I do not have to split into three index arrays, I will not. Can I use one index array to read all eight reading off one SG-140 module for three different strain gauges?

 

I am still not sure how to index by row and column to go from a 2-D array to a scalar element or shape the 2-D array to a 1-D array.

 

I reattached the project because I made one correction.

 

Sorry and thanks for your help.

0 Kudos
Message 6 of 9
(3,874 Views)
Solution
Accepted by topic author Cindi

My comments about not needing to duplicate the index array were based on what your VI was showing at that time.  Once you have the VI implemented with the multiple modules, then you will need to implement a single Index Array stretched out far enough to get all of the channels of interest.  From a 2-D array, you need to wire up both the row index and the column index to get a single scalar element.  So first channel would be 0 and 1, next channel 0 and 4, next 0 and 7.  The next module would be 1 and 1, 1 and 4, 1 and 7.

Message 7 of 9
(3,869 Views)

hey

i use the script matlab when i connect a output of Script Node to input of other Script Node i get this message error : 

These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is 1-D array of
double [64-bit real (~15 digit precision)].
The type of the sink is double [64-bit real (~15 digit precision)].

 

Please how can i conevert 1-D array of double to a double ?

0 Kudos
Message 8 of 9
(3,588 Views)

You should have started a new message thread rather than jumping on to a 2 year old thread.

 

You need to use Index Array to get a particular element out of an array.  If you still need help, please start a new message thread.  But first I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

since working with arrays is a basic LabVIEW skill.

0 Kudos
Message 9 of 9
(3,571 Views)