 brian_s1
		
			brian_s1
		
		
		
		
		
		
		
		
	
			04-27-2009 12:14 PM
Hi,
I am new to Labview and just know the very basics. I am using some sample code to send and receive CAN messages. I need to output the data from the recieved messages (just the first two bytes) on to two gauges, i.e. the first two values of the data array. Is there any way of doing this? Also it would be handy if i could control the value of the first data byte using a knob or dial. Any help would be much appreciated.
Thanks
Brian
Solved! Go to Solution.
 sahpe
		
			sahpe
		
		
		
		
		
		
		
		
	
			05-01-2009 11:24 AM
Hello Brian,
You can use the "Array Subset" function in your Arrays pallette of your block diagram and choose zero index and size of two (2 elements off the array) in order to extract the first two values.
Here is a link to the help document of the function:
http://zone.ni.com/reference/en-XX/help/371361E-01/glang/array_subset/
You can have the whole of your input as a control and set default values for the elements that you want unchanged. You can access this property by setting the value on the control and then right-clicking on it to go to "Data Operations" and "Make this value default". Then, you can right-click on the control that you want changed and replace it with a dial. Make sure you select its representation correctly. For example for a byte you would probably select U8.
Attached is an example, please have a look and let me know if it helps.
Kind Regards, 
Michael S.
Applications Engineer
NI UK & Ireland
05-05-2009 03:45 AM