Jump to content

paulw

Members
  • Posts

    2
  • Joined

  • Last visited

    Never

paulw's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I am looking at the eval version of NI Vision Assistant and from what I can tell is that you need to use "IMAQ ExtractColorPlanes". This will give you three images to work with. One for each red, green and blue. You can analyize each image seperatly or recombine them to one image with an operator (add for example). The eval of vision assistant shows an option for the "Extract color planes" that give the "value plane". Since I only have the eval version I cannot create the labview vi to see the code it would create, but I assume that it does an addition of the three images producted by the extract color planes vi to get one image of just grayscale.
  2. Terence, I noticed that your VI has the "enable termination character" set to false on your configure step. I would suggest setting this to true so you do not timeout when reading the data on the serial port. Then when you do a read you will only get the data from the start of the buffer up to the first termination characther (0x0A). Otherwise you could get all the data at the serial port by connecting the "bytes at port" output to the byte count of the serial read and process the whole string. In this case the line feed will be part of the return string. Next, I would convert the whole string to a byte array for easier manipulation. Use the string "String To Byte Array". Now you will have an array of bytes to work with instead of a string. After that there are a couple of vi that you can use to join integers togeater to create larger ones. Under numeric->data manuniplation there are two vi's join number and split number. Index the byte array to get your upper byte and lower byte and use the join number to get a 16 bit word containing your 12 bit conversion. (You can also use a type cast too.) Optionaly use an AND operation with a hex byte value of 0x0F to clear any incorrect data in the upper nibble of the byte that contains only 4 bits of the conversion data. Check the attached VI for the changes... Download File:post-4832-1145886556.vi
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.