Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Atmega32 and Labview data read and write

Hallo all


In my internship program I have to write a program to communicate Atmega32 with labview. In UART 5 byte is comming,

First byte is address byte
2 & 3 bytes are current values and 
4 & 5 bytes are temperature values. 

I wanted to display the current and temperature graphs and readings in labview. I updated basic serial read and write program and attached in this mail. Appart from this I made a communication RAW protocol using this link http://www.ni.com/white-paper/4478/en/  .

 My problems are 

 

I getting some random values from microcontroller. How can I read data from correct memory address? 
Is there any specific command to read memory address? 

 

Thank you in advanced

Download All
0 Kudos
Message 1 of 7
(5,887 Views)
Using the VISA wizard destroys the normal serial driver so using the serial example would be a waste of time.

Any commands would be documented in the manual of the atmega if it came with any firmware. If you have programmed it, then the specific command is whatever you have programmed.
0 Kudos
Message 2 of 7
(5,880 Views)
p.s. Writing the IDN? query would seem to be extremely silly. This command is part of the IEEE488.2 spec.
0 Kudos
Message 3 of 7
(5,873 Views)

Thank you very much Dennis.

This is the first time I am something doing in Labview. Sorry for my silly doubts.

Can you suggest any example vi to slove my problem?

0 Kudos
Message 4 of 7
(5,861 Views)
You said the first byte was an address, next two bytes was current and last two bytes was temperature. Where did you get that information? Did you undo the driver created by the wizard?

Right click on the String indicator you have and select Hex Display. See if the values make sense.
0 Kudos
Message 5 of 7
(5,855 Views)

 

One of my senior did the microcontroller programming, he only pass that information. This is only one part of my internship. 

If I deleted the driver created by the wizard, how can I communication with microcontroller?

0 Kudos
Message 6 of 7
(5,851 Views)
If you are running the serial example and getting data without errors, then the driver from the wizard is not active and you must be using a virtual com port driver.

You'll need full information on the micro programming. That cannot be provided here or even guessed at.
0 Kudos
Message 7 of 7
(5,848 Views)