4d Display Visi serial commands interface

Forum for Flowcode v6 beta users

Moderator: Benj

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 4d Display Visi serial commands interface

Post by acestu »

Hi Benj,
Benj wrote:Thinking about this.
Visi interface is loaded onto the SD card in the 4D display and it would be a huge undertaking to try and replicate all of this functionality.
If I could figure out how to parse the .dat file and generate the correct visuals for the visi front end then it may not be too bad to add simulation too. Is what we have already enough to make it useable?

Yes this is a brilliant start, thank you so much for doing this it means that we can use the components on the display to control the host micro, using the display as a serial slave would be a great tool also , but I realize you have a lot to do yet....

Cheers and thanks again

Acestu :D
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.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 4d Display Visi serial commands interface

Post by acestu »

Hi Benj,

I have tried to get your Visi Demo chart going but to no avail, I am enclosing the 4D Workshop file that I am using which has just the 2 rocker switches, could you take a look at it please and see if anything is wrong, I have set events on both rocker switches to "Report Message"

Thanks
Acestu
New-rocker.rar
(1009 Bytes) Downloaded 374 times
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.

User avatar
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: 4d Display Visi serial commands interface

Post by Benj »

Hello,

Might be worth trying with the rockerswitch events set to none. With the event set to report the display will talk to the micro when the switch state changes. With the event set to none then you should be able to poll the state of the switch at your leisure.

Also worth checking the baud rate of the Flowcode component is set correctly looked like it should be 115200 rather then 9600.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 4d Display Visi serial commands interface

Post by acestu »

Hi Benj,

Is there any chance you could post the 4D Workshop file that you used to setup the Visi-Demo that you did please...

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.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 4d Display Visi serial commands interface

Post by acestu »

Hi Ben,

I have been trying to get your Visi-Demo chart to work and noticed that the two commands for the rocker switch index 0 are the same, so is it not switching rocker 0 on and then switching it on again ?
Visi-Demo-Benj.png
(9.87 KiB) Downloaded 5633 times
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.

User avatar
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: 4d Display Visi serial commands interface

Post by Benj »

Hello,

Yes whoops the second VisiWriteObject call should be 0,0 not 0,1.

Not actually tested the code on hardware but it should be ok, went through it quite carefully. If your still having problems I will dig through for my 4D display and see if I can help you debug.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 4d Display Visi serial commands interface

Post by acestu »

Thank Benj,


I will have another look when I get home tonight, I could not find the baud rate on the component, so I thought I would try the TX/RX flasher but I could not get that working either...

cheers for now
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.

User avatar
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: 4d Display Visi serial commands interface

Post by Benj »

Hello,

The component should default to 9600 baud but there is an issue with this as you need to call the init function to initialise the UART but this then assumes a old style display and ramps the UART speed up to a higher baud (57600 from memory). Not sure if the newer display supports this as is. Will probably end up seperating out the Visi stuff into a stand alone component so it's easier to determine if your drawing to the display or talking via the Visi interface.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 4d Display Visi serial commands interface

Post by acestu »

Hi Benj,

These are the baud rates that the 4d displays support in 4D Workshop..
Baud.png
(6.45 KiB) Downloaded 5624 times
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.

User avatar
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: 4d Display Visi serial commands interface

Post by Benj »

Hi Stu,

New fully tested and working component now available from here: http://www.matrixmultimedia.com/mmforum ... 53&t=12734

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: 4d Display Visi serial commands interface

Post by acestu »

Hi Benj,

Thanks for doing this so quickly, I know what I am doing all day sunday :lol: ..


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.

Locked