LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can Labview use assembly code instead of C code

I am trying to develop a system that uses an Intel 8051 uprocessor. I didn't develop the code for this app but I am charged with developing the end UI. My problem is that the micro code is written in assembly code. Is there a way that I can get LabVIEW to interface with assembly code or am I going to have to convert it to C? Can anyone point me in right direction?

Matt Kniller
Nova Research
202-404-2824
0 Kudos
Message 1 of 5
(3,422 Views)


@mkniller wrote:
I am trying to develop a system that uses an Intel 8051 uprocessor. I didn't develop the code for this app but I am charged with developing the end UI. My problem is that the micro code is written in assembly code. Is there a way that I can get LabVIEW to interface with assembly code or am I going to have to convert it to C? Can anyone point me in right direction?

Matt Kniller
Nova Research
202-404-2824




I think you have a little problem with understanding your particular setup. LabVIEW will not run on a 8051 system EVER. As such it does not matter how your 8051 system is programmed as you can not link the code which runs on this system to a LabVIEW system at all in the sense as linking object code into LabVIEW. LabVIEW will run on a Windows, Mac OS, or Linux computer system and probably talk to your system over RS-232, TCP or some such communication link. As such your microprozessor system will have to provide some command line interface over one of these connections.

Then in LabVIEW you use either VISA for the RS-232 connection or the built in TCP functions to communicate with your microprocessor board.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 2 of 5
(3,413 Views)
I am aware of what I am doing I just chose poor wording. I am trying to use the VISA blocks to communicate the system, however the only means of communicating with it right now is to use Hyperterminal. Once in hyperterminal you input a S and the system begins it's routine. So now I am trying to use LabVIEW rather than hyperterminal. Any suggestions?

Matt Kniller
0 Kudos
Message 3 of 5
(3,409 Views)
Well, that's a big difference. Anything you can do with Hyperterminal, you can do with LabVIEW and VISA. What exactly is the problems you've been having when trying to use VISA? If the system is not seeing the command you send, make sure you've set the com parameters (baud, etc) correctly and verify that you're sending the correct termination character. When you use hyperterminal, it will automatically append a CR/LF to the text you type and hit the Enter key. You have to add this to your LabVIEW code. You can use a VISA property node to append a character to every write or use the concantanate string function with the constants on the string palette.
Message 4 of 5
(3,397 Views)
Ok this makes much more sense.

So now open the VISA resource for the serial port you have connected to your controller and set the baudrate, data bits, stop bits, etc the same way as you do in Hyperterminal.

Now use a VISA Write node with the opened VISA resource name and wire a string to it with the letter S and a carriage return or maybe line feed appended. Hyperterminal appends a carriage return and/or line feed automatically when you hit the return key so you do not explicitedly see that in the Hyperterminal window.

The simplest way to create that string in LabVIEW is by enabling the "'\' Codes Display" option in the string controls popup menu and then enter "S\r", "S\n", or maybe "S\r\n" without the double quotes in it. Just try it out.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 5 of 5
(3,394 Views)