LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

MAX 232 communication with microcontroller GUI

Hello,

         I am new to embedded world and new to lab windows. I am doing one project ( Checking an errors and scrach on CD,So i divide CD area into different square blocks , i want to select some CD blocks to check ) in which i have to control two stepper motors which further control vertical and circular deflections. I am using Atmel AT mega32 microcontroller. I wanna construct one GUI in which i can select some square block for checking and some part i can leave by clicking or unclicking,further  which can show serial communication parameters, postion, angle of motor deflection..I wrote a programm in atmel studio. How can i construct such a GUI  in Lab Windows and how do i make a connection between these two programms.

 

Thanks millions.

 

Regards:

             Singh

 

0 Kudos
Message 1 of 4
(2,950 Views)

Hello Singh,

I'm almost sure no CVI program can run on Atmel microcontroller, but since you have already created the mc program with proprietary compiler, I suppose your problem is now in interfacing mc application with an external PC that monitors test execution.

 

Since you mention MAX232, I suppose you plan to perform communication between the microcontroller and the CVI program over the serial channel. CVI comes with a native RS232 library which permits you to easily configure and open a serial communication channel and write/read over it. Searching with the Example Finder (Help >> Find examples... menu item) with 'serial' keyword will return you with some basic serial communication examples that you can use to start developing your application.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 4
(2,941 Views)

Hello Reberto.

                      Thanks a lot.I am aware about RS232 library and communication between pc and microcontroller but i dont know how i can move motors. as i mentioned above a example of CD.i am attaching a rough sketch clearing what actually i need, i need something like mask in a GUI where i can select a area of CD and further i can decide which dice have to check or uncheck by clicking  a dice area . Shortly controlling of two motors according to actuall area  mask.Thanks onces more.

 

Best regards:

                   Malkiat Singh

0 Kudos
Message 3 of 4
(2,924 Views)

Regarding the GUI, you could use a picture control where to load a CD image with dice grid added or a canvas control where to paint a circle and the dice grid; whichever is the control used, you can trap EVENT_LEFT_CLICK event in the control callback and elaborate eventData1 end eventData2 parameters to detect the dice operator clicked on: ConvertMouseCoordinates function can help you in this matter. Next you will need to translate the position obtained in the proper commands to send to the microcontroller according to the software / protocol loaded in it.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(2,919 Views)