Page 1 of 1

Help with Visi Component Please

Posted: Wed Aug 28, 2013 11:05 pm
by acestu
Hi,

Now that I understand the basics of sending data from a 4D display to a host micro, I am now trying to build a simple chart that will send data the other way ie to a 4d display from a host micro, I have used (User LED 19) on the display and a simple momentary switch on the pic, however my chart works in simulation but not in hardware also in the console it says that the serial data being sent out is erroneous, could somebody have a quick look please, I will enclose the chart and error pic.
visi-error.png
(52.53 KiB) Downloaded 5565 times
multiDemo.fcfx
(8.62 KiB) Downloaded 584 times
thanks
Acestu

Re: Help with Visi Component Please

Posted: Wed Aug 28, 2013 11:19 pm
by Benj
Hi Stu,

If you select the Visi component on the panel then in the properties you have some options.

1) The UART channel is set to software. This should work ok but might be worth trying one of the hardware options and seeing if you have any more luck.

2) The sim console is returning FF or a timeout error because it is unable to communicate directly with a display. If you have a 4D USB cable or a USB to serial then you can hook the computer up to the display and control it from the sim to test out your program.

Otherwise the only thing I might change is to store the state of the switch the last time around the loop and only update the state of the display switch when the value has changed. This means there is less data flying around constantly and your less likely to have a conflict issue of an incoming data change report while you are preparing to send out data.
multiDemo.fcfx
(9.76 KiB) Downloaded 596 times

Re: Help with Visi Component Please

Posted: Wed Aug 28, 2013 11:50 pm
by acestu
Hi Benj,

I have my display connected via usb and in my windows device manager it says that it is on com port 7, however in the visi component settings in the com port drop down selection there is only 1 port available and that is 3, I have also tried hardware channel 1 but nothing different.

thanks
Acestu

Re: Help with Visi Component Please

Posted: Thu Aug 29, 2013 9:16 am
by Benj
Hi Stu,

Just out of interest please can you make sure the 4D program is closed. It might also be worth unplugging and replugging the 4D cable from the PC just to be certain nothing is using it. The COM port should go all the way up to 82 so COM7 should work ok. I had the same problem with the COM port not showing up originally but I had the 4D software open and it was using the COM port connection. You may also need to click the COM port selection property twice as the first time you click it may not have refreshed yet and loaded in new ports.

If this fails then you might be able to go into device manager and change the COM port number to something else.

Let me know how you get on.

Re: Help with Visi Component Please

Posted: Thu Aug 29, 2013 9:27 am
by Benj
Just had a look and the COM port component does not refresh it's ports once the program is loaded. Connect the 4D cable to the PC before loading the Flowcode program and it should work correctly and show port COM7.

Edit: I have now fixed this for the next release.

Re: Help with Visi Component Please

Posted: Thu Aug 29, 2013 10:23 am
by acestu
Hi Benj

Thanks for the info, I will try that as soon as I get home later.... :D

Thanks
Acestu

Re: Help with Visi Component Please

Posted: Thu Aug 29, 2013 5:57 pm
by acestu
Hi Benj,

I have tried your suggestion of connecting my display before I start Flowcode and it worked fine, also thanks for altering my chart so that it is not constantly sending off messages....

cheers
Acestu