From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 with 9401

I have downloaded the file from the tutorial to implement an rs232 communication with the NI9401 module. (http://sine.ni.com/devzone/cda/epd/p/id/2164)

 

I have make it sweatable for my system and have it compiled to the fpga.

 

The connection is working for so far. I receive characters on my serial port and can send characters to the cRio. I use an max232 for ttl to rs232 conversion. But my problem is I don't receive the right characters. When I send an "A" (ascii 65), I receive "_" (ascii 95), when I send a "B" (ascii 66), I receive "/" (ascii 47). I have this problem by Tx and Rx.

 

I have checked my settings (9600 8n1). When I'm linking the Tx and Rx from the cRio, the connection is working. But the conncetion doesn't work with the "standard" rs232.

 

Hopefully someone can help me.

0 Kudos
Message 1 of 10
(4,825 Views)
RS232 do not use TTL signal levels. Have you implemented a TTL to RS232 level converter in your circuit. A MAX232 type circuit is often used for this purpose(use Google for more info about MAX232)


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 2 of 10
(4,823 Views)
Thank you for your quick response, I had allready installed a max232 but is make no difference. I also tested with direct connection from 9401 to microcontroller (communication on TTL level) and it gives the same result.
0 Kudos
Message 3 of 10
(4,801 Views)

Hi

 

Why aren't you reading serial data off the rs232 port on the microcontroller using VISA commands? y through FPGA.

Its a lot easier to do that than do all the FPGA programming.

 

--dee 

0 Kudos
Message 4 of 10
(4,790 Views)
I need two serial ports on my system. I use the serial port on my realtime engine allready. I want to create a second port by my ttl module.
0 Kudos
Message 5 of 10
(4,778 Views)

Hi

 

Is there any chance you can post some of your code. I am trying to get some bidirectional serial communication to work with a cRIO and an 9401 module. But im not sure how to implement it in the FPGA.

 

best regards

 

soeren

0 Kudos
Message 6 of 10
(4,689 Views)

Hi,

 

I just needed only to send ascii characters, so in my code you can only see the code which is sending data.

 

I will post the code tomorrow.

 

Greets

0 Kudos
Message 7 of 10
(4,671 Views)

Here are pictures of my vi's

 

(FPGA and RT)

 

(The cases you can't see are empty)

 

Realtime

RT.jpg

FPGA

FPGA.jpg

0 Kudos
Message 8 of 10
(4,631 Views)

I have also the same problem can any one help me


@Johan88 wrote:

I have downloaded the file from the tutorial to implement an rs232 communication with the NI9401 module. (http://sine.ni.com/devzone/cda/epd/p/id/2164)

 

I have make it sweatable for my system and have it compiled to the fpga.

 

The connection is working for so far. I receive characters on my serial port and can send characters to the cRio. I use an max232 for ttl to rs232 conversion. But my problem is I don't receive the right characters. When I send an "A" (ascii 65), I receive "_" (ascii 95), when I send a "B" (ascii 66), I receive "/" (ascii 47). I have this problem by Tx and Rx.

 

I have checked my settings (9600 8n1). When I'm linking the Tx and Rx from the cRio, the connection is working. But the conncetion doesn't work with the "standard" rs232.

 

Hopefully someone can help me.


 

0 Kudos
Message 9 of 10
(3,839 Views)

Hi benamor,

 

please don't create double posts for the very same question!

 

Asking for help in a 4 year old thread might not provide the expected results…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 10
(3,834 Views)