FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use COM port (RS-232) to control LED Panel problem in LabVIEW

Solved!
Go to solution

Hi all,

 

In my new project, we need to  display some text using the RS232 control type LED panel.

 1. Does the LabVIEW support standard RS-232 command likes Windows Telnet?

2. My LED panel not support VISA, does LabVIEW support another way to sending command to COM port?

 

Thanks.

 

Regards,

Robert

 

由 Robert LAW 在 09-29-2008 08:09 PM
上編輯的訊息
0 Kudos
Message 1 of 15
(10,610 Views)

Robert,

 

1 - LabView does a very nice job of handling RS-232 communications. 

 

2 - Your LED panel does not need to support VISA.  VISA provides the programming interface between the hardware and the LabVIEW development environment.  http://www.ni.com/visa/

0 Kudos
Message 2 of 15
(10,590 Views)

Hi Centerbolt,

 

Thanks for your comment.

But I get a problem with it.

Attached the command table of LED panel for reference.

 

I hope you can suggest the way to solve the problem.

 

Thanks.

 

Regards.

Robert

 

 

0 Kudos
Message 3 of 15
(10,566 Views)

Robert,

 

Sorry, I must be missing something.  Exactly what is the problem? 

 

 

0 Kudos
Message 4 of 15
(10,561 Views)

Sorry for missing the content.

 

As you see the command is like 0x 97, 0x00, 0x01, 0x02, 0xd1, 0x6b? and its 16 bit data? I find the visa is using string to communicate, does the cFP can support to sending the 16 bit digital data and how?

 

Also, in the command table, the LED panel also reply the 16 bit data, how could I setup the monitor windows?

 

Thanks.

 

Regards,

Robert

0 Kudos
Message 5 of 15
(10,546 Views)

Hi!

   I didn't look deeply at the protocol manual, but it seems a simple serial protocol.  To send hexadecimal bytes, you have some possibilities-

 

   First, directly wire a string to VISA write, and edit the string as hexadecimal (right click on the string constant, and select "Hex display").

 

   Second: wire an array of U8 to "Byte array to string", and this to VISA write.  This is more versatile, and allows you for a better manipulation of data to be sent (and read).

 

1:

 

 
2:
 
Message Edited by Graziano on 10-03-2008 06:28 AM
Message Edited by Graziano on 10-03-2008 06:28 AM
Download All
Message 6 of 15
(10,536 Views)

HI All,

 

Thanks for support.

 

I would like to deisign a hex string: 1234567890..... and split it every 2 digits into U8 array, i.e. 12,34,56,78,90,...

Does  LabVIEW can convert the strings like it?

 

Moreover, I would sum the 12,34,56,78,90,...and only get the 2 LSB(i.e if answer is 3DC, the output result is DC)

Does it OK?

 

Thanks.

 

Regards,

Robert :smileywink:

0 Kudos
Message 7 of 15
(10,497 Views)
Hi! What you need are some basic string/U8 array manipulations, they're quite basic LabView techniques. See attached VI. Don't forget to set all constant, controls and indicator to Hexadecimal display, or you'll get confused with decimal! I suggest to set "radix" visible on these objects, as I did in my VI. I'm here for further questions... hope this helps! graziano
Message Edited by Graziano on 10-06-2008 03:25 AM
Message 8 of 15
(10,479 Views)

Hi Graziano,

 

Thanks for your support.

I use "Add Array Element" VI does it have the same function?

 

Moreover, If I consider more bytes and use LSB first display format, Does LV OK to display,?

I use your VI result and in use "Swap Bytes" VI function.

 

In front panel view, it can change the result "01AE" to "AE01" in normal display.

But I change to HEX view, the value was in ASCII "4145 3031". Does can direct swap bytes and display HEX correctly(i.e. AE01)

 

Thanks very much.

Regards,

Robert

由 Robert LAW 在 10-06-2008 02:03 AM
上編輯的訊息
0 Kudos
Message 9 of 15
(10,474 Views)

Hi!

   Sorry, your post is a little confused to me... in which sense you use "add array element"? In which point?

 

   More, if you enter a string in NORMAL display, and you digit "AE01", it is composed of 4 Bytes!!! the first being hex 0x41, then 0x45, 0x30 and 0x31.  This is confusing you, in my opinion! You have to input the string as hexadecimal, not normal display.  You have to choose FIRST "Hex display", and then you input the string!

 

   One method to overcome this, is to work directly with Bytes (U8 array), and set display to Hex!

  

   So, I think that you'd better post a VI to let me understand a little more....

 

graziano

0 Kudos
Message 10 of 15
(10,468 Views)