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: 787 times
Been thanked: 226 times
Contact:

Re: 4d Display Visi serial commands interface

Postby acestu » Wed Aug 21, 2013 11:18 pm

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: 787 times
Been thanked: 226 times
Contact:

Re: 4d Display Visi serial commands interface

Postby acestu » Thu Aug 22, 2013 12:30 am

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 154 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: 14299
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4394 times
Been thanked: 4123 times
Contact:

Re: 4d Display Visi serial commands interface

Postby Benj » Thu Aug 22, 2013 9:39 am

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.
These users thanked the author Benj for the post:
acestu (Thu Aug 22, 2013 10:14 am)
Rating: 5.26%
 

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

Re: 4d Display Visi serial commands interface

Postby acestu » Thu Aug 22, 2013 4:19 pm

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: 787 times
Been thanked: 226 times
Contact:

Re: 4d Display Visi serial commands interface

Postby acestu » Thu Aug 22, 2013 8:49 pm

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
Visi-Demo-Benj.png (9.87 KiB) Viewed 4435 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: 14299
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4394 times
Been thanked: 4123 times
Contact:

Re: 4d Display Visi serial commands interface

Postby Benj » Fri Aug 23, 2013 10:12 am

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.
These users thanked the author Benj for the post:
acestu (Fri Aug 23, 2013 12:36 pm)
Rating: 5.26%
 

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

Re: 4d Display Visi serial commands interface

Postby acestu » Fri Aug 23, 2013 12:38 pm

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: 14299
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4394 times
Been thanked: 4123 times
Contact:

Re: 4d Display Visi serial commands interface

Postby Benj » Fri Aug 23, 2013 1:55 pm

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: 787 times
Been thanked: 226 times
Contact:

Re: 4d Display Visi serial commands interface

Postby acestu » Fri Aug 23, 2013 6:19 pm

Hi Benj,

These are the baud rates that the 4d displays support in 4D Workshop..

Baud.png
Baud.png (6.45 KiB) Viewed 4426 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: 14299
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4394 times
Been thanked: 4123 times
Contact:

Re: 4d Display Visi serial commands interface

Postby Benj » Sat Aug 24, 2013 3:10 pm

Hi Stu,

New fully tested and working component now available from here: viewtopic.php?f=53&t=12734
These users thanked the author Benj for the post:
acestu (Sun Aug 25, 2013 12:07 am)
Rating: 5.26%
 

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

Re: 4d Display Visi serial commands interface

Postby acestu » Sun Aug 25, 2013 12:08 am

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.