LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA port query

Unlike the pictures that you attach to your messages, and which are really just pictures that can't be debugged and look grainy and hard to decipher, mine is a LabVIEW snippet that you can download and drop into a LabVIEW diagram and it will create the code automatically as in the image.

 

The forum software unfortunately makes this unnecessarily complicated and various browser variants tend to throw in some wrench into the wheels too for this. If you use Chrome, what works for me is to click on the snippet, which opens it in a sort of popup window, then on that window you see a download button on the lower right end of the window and click on that. That way the whole image including the LabVIEW snippet data is downloaded. Otherwise either the forum software or the browsers will nowadays strip of any data from the image they think is not legit image data.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 11 of 22
(1,520 Views)

Your VI works perfectly for temperature.

 

Can you tell me something about configuring the clusters. I want to learn how it functions and want to extend to read the velocity values.

Thanks a ton.

0 Kudos
Message 12 of 22
(1,508 Views)

Most importantly, I want to learn how to configure one (cluster) and sort it out with names. I sort of got idea now how to unbundle byname. I want to know how you designed and configured cluster of 7 elements, how do I assign which byte is what type and name them accordingly.

0 Kudos
Message 13 of 22
(1,494 Views)

I simply took the description from your PDF document and created a cluster that matches a (partial) data frame from the device. This cluster does NOT contain all the data that is returned by the device but will need to be extended for that with additional elements.

 

Also, I find the documentation very confusing and hard to understand, so I can't help you much more with this. I suppose that the documentation is sufficient if  you also have the actual hardware to see how it reacts and what data is returned when something changes on the device, but for just some exercise in the vacuum it is pretty confusing.

 

As you can see I included the elements from the data frame up to and including the "FlowData" element.

 

It mentions something about the data having different meaning depending on ShowState, which is a byte later in the message. But I have no idea if this is simply a value that is consecutively running through the different values or if you can somehow influence which ShowState is returned. You will either have to extend the cluster to include all the extra data and then pick out the ShowState byte to decide what values are returned in the different other elements based on the confusing description, or you can for now just index into the 41st element of the byte array and extract it that way.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 14 of 22
(1,487 Views)

Okay. I just want to know how you configured the VI in the Picture you posted, not extended one. Just till the part where you did. I want to know how you configured the cluster up to FlowData.

0 Kudos
Message 15 of 22
(1,480 Views)

On the first page of your PDF document you see the frame format of the 46 byte answer.

 

So I created a cluster and added in this order:

 

- one LabVIEW 8-bit unsigned integer, for the uchar : iDone1

- one LabVIEW 8-bit unsigned integer, for the uchar : iDone2

- one LabVIEW 16-bit signed integer, for the signed int : FirstLine

- one LabVIEW Single Precision Float, for the float : SecondLine

- one LabVIEW Single Precision Float, for the float : PressData

- one LabVIEW Single Precision Float, for the float : WindData

- one LabVIEW Single Precision Float, for the float : FlowData

 

From here you would need to add further:

 

- one LabVIEW 16-bit signed integer, for the signed int : TempData

- one LabVIEW Single Precision Float, for the float : WidthOrDia

- one LabVIEW Single Precision Float, for the float : Height

- one LabVIEW 8-bit signed integer, for the signed char : ThirdLine

- one LabVIEW 8-bit unsigned integer, for the uchar : WD_DigitNum

- one LabVIEW 8-bit unsigned integer, for the uchar : H_DigitNum

- one LabVIEW 8-bit unsigned integer, for the uchar : Infor1

- one LabVIEW 8-bit unsigned integer, for the uchar : Infor2

- one LabVIEW 8-bit unsigned integer, for the uchar : Infor3

- one LabVIEW 8-bit unsigned integer, for the uchar : Infor4

- one LabVIEW 8-bit unsigned integer, for the uchar : Infor5

- one LabVIEW 8-bit unsigned integer, for the uchar : Infor6

- one LabVIEW 8-bit unsigned integer, for the uchar : Infor7

- one LabVIEW 8-bit unsigned integer, for the uchar : Infor8

- one LabVIEW 8-bit unsigned integer, for the uchar : SowState (ShowState?)

- one LabVIEW 8-bit unsigned integer, for the uchar : PressUnit

- one LabVIEW 8-bit unsigned integer, for the uchar : velorflowunit

- one LabVIEW 16-bit unsigned integer, for the signed int : crc

 

 

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 16 of 22
(1,472 Views)

I still don't understand how to make a cluster. I searched cluster on the help bar (Image1) and after clicking something like on image 2 appeared. Where do i go from here and create the required parameter and add to it.

Download All
0 Kudos
Message 17 of 22
(1,435 Views)

I don't know what image1.png is supposed to be showing.

 

But when you don't know how to create a cluster, that means it is time to go back and look as those LabVIEW tutorials you took as you must have missed it or forgotten it.
LabVIEW Introduction Course - Three Hours
Learn LabVIEW

 

A cluster is a container that contains other controls.  Drop a numeric constant on your block diagram.  Now drag that into the boundaries of the cluster and let go.  You will now have a cluster that contains a numeric element.  You can drag and drop more items.  You can also right click on the border of the cluster and pick Reorder Elements, which will allow you to change the order of times in the cluster.  (Like if you add an element later, but want that to be the first element of the cluster.)  There are also menu choices to allow you to arrange the elements to make a neater more compact cluster.

0 Kudos
Message 18 of 22
(1,428 Views)

You really should go through the tutorials at the top of this forums posts!

 

This is basic LabVIEW programming. Without this knowledge you can't do really much in LabVIEW at all.

 

There are various ways you can do this:

 

- Right click inside the cluster and then from the menu palette you get, go to the relevant sub palette (Boolean, Numeric, etc) and select the element you want to drop inside.

 

- Simply have the palette window open and select the desired element and drop it inside the cluster.

 

Once you have for instance placed a Numeric Constant in the cluster, you can change its datatype, edit its label, move its location, etc. Repeat until you have all the elements you want. The elements will be initially logically ordered in the same order as you added them to the cluster, the optical position is totally irrelevant.

 

You can right click on the border of the cluster and select "Reorder Cluster Elements" and click one element after the other in the order you want them logically inside the cluster. And to make things easier for the one who has to look at this code later (which could be very well you) you should make sure that you arrange the visual order of the elements inside the cluster to resemble the logical order you just assigned.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 19 of 22
(1,424 Views)

Can you please check the links that you have provided. The first link you have mentioned does not work. I want to look into the detailed LabVIEW course. As for the second link you have mentioned, I did that module already and it covers only basics.

0 Kudos
Message 20 of 22
(1,392 Views)