LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fuzzy logic cant display output

Solved!
Go to solution

hi everyone i have some question. i want to makes fuzzy logic with "mimo". 3 input data send by arduino serial comuniccation the data can be transmit and can display, but i have some problem with the output. why the result cant display ? the output always "0" what happen for this ? thanks for advance.

 

mamprat_0-1629129917112.png

 

0 Kudos
Message 1 of 13
(2,436 Views)

Perhaps your fuzzy system is setup wrong, because you are getting an output... it's just 0.

 

Also if you have 12793 bytes at port when doing a read, chances are you are doing it wrong.

0 Kudos
Message 2 of 13
(2,391 Views)

Is this due to an error input? Or is it because the output is not legible on the device?

0 Kudos
Message 3 of 13
(2,385 Views)

Please provide your VI and .fs file you are using for your fuzzy system, it's easier to debug than an image.

0 Kudos
Message 4 of 13
(2,383 Views)

it is vi and .fs file sir

0 Kudos
Message 5 of 13
(2,376 Views)

Could you save the VI for LV2019? I can't open it.

0 Kudos
Message 6 of 13
(2,370 Views)

Hi mamprat,

 

there are several problems in your small VI:

  • don't use BytesAtPort to determine the message length! Use a large number istead when you are receiving messages with TermChars!
  • don't place an additional wait in parallel to COM port reading: that's the reason you receive that large amount of data when all you expect is one line of text with just 3 numbers…
  • I didn't check your fuzzy parameters, but the Fuzzy control outputs just 2 values while you expect to get 3 output values…

Cleanup your code to make it more readable:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 13
(2,368 Views)

can you try it sir

0 Kudos
Message 8 of 13
(2,365 Views)

i expect it consists of 3 inputs and then it produces 3 outputs too. can it be done sir ?

0 Kudos
Message 9 of 13
(2,363 Views)

I checked your fuzzy system a bit... and it works, except that none of the values you feed it are in the range it expects (EDIT: at least not the ones from your first image provided -127 15.25 68.05).

Check if the rules set are correct, because there's one rule that just says "IF THEN" with no inputs or outputs...

Use Test System to check if what you are feeding it actually produces an output you want.

 

Regarding your code, do what GerdW says.

0 Kudos
Message 10 of 13
(2,356 Views)