Page 1 of 1

How to get integer value from LUT FC6??

Posted: Thu May 31, 2018 7:07 am
by kg300
In FC-V6 i used LUT component to get integer value, program simulate ok but on physical hardware only get Byte value from LUT. any suggestion plz...

Re: How to get integer value from LUT FC6??

Posted: Thu May 31, 2018 8:06 am
by mnf
That is weird - you would think that changing the storage type to 16 bit (in the lut properties) would fix this - but it doesn't!

Reading an 8 bit number from 0 * 256 + 8 bit read from 1 also doesn't work if data is set to 16 bit.

Setting data to 8 bit - and when storing it in the lut properties as 8 bit (eg 258 would be 1, 2) and then reading it back 8 bits at a time does work.....

This in v7 - modded to use UART
LUT.fcfx
(9.97 KiB) Downloaded 223 times
It doesn't work at all in v8 - one for the bug list?
Edit: This seems to be a symptom of a bug I've mentioned to Matrix in v8 regarding the FAT component.. Some macros don't accept arguments of integer type - although they should!:

So
uart.png
(7.29 KiB) Downloaded 1431 times
Gives the following compiler message:
http://www.matrixtsl.com
Errors when generating C source code:
LUT.c : 1 : error : Incompatible argument: UART1::SendNumber
LUT.c : 679 : error : Incompatible argument: UART1::SendNumber

FINISHED
Martin

Re: How to get integer value from LUT FC6??

Posted: Thu May 31, 2018 8:14 am
by LeighM
The LUT component had a fix back in February, please try the attached, into your Flowcode 6 components directory.