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.
thanks
Acestu
Help with Visi Component Please
Moderator: Benj
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Help with Visi Component Please
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Help with Visi Component Please
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: Help with Visi Component Please
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
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
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Help with Visi Component Please
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Help with Visi Component Please
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.
Edit: I have now fixed this for the next release.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: Help with Visi Component Please
Hi Benj
Thanks for the info, I will try that as soon as I get home later....
Thanks
Acestu
Thanks for the info, I will try that as soon as I get home later....
Thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: Help with Visi Component Please
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
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
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.