Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

access of cRIO serial vs. PC serial

 

Having difficulty trying to communicate with a xenus amplifer over serial port.

I have narrowed down the problem speciffically to the following.

 

I know the comm port is working correctly.

The local loopback test fails if a project involving the cRIO is or has been open.

The only way i can get the loopback test to work is when i create a new project and implent the test.

I cannot even paste the loopback test into an existing project involving the cRIO

 

Logically my implementqation is not traditioanlly use of the cRIO which is an embedded controller.

The CRIO has its own serial port which is likley to be causing the confusion,.

Yet, im not able access this serial port to pull the data off it.

 

Any ideas on how i can access the serial port of the PC while running code on the CRIO?

I am running in scan mode rather than FPGA if it matters.

 

 

  

0 Kudos
Message 1 of 7
(4,300 Views)
Probably because the cRIO was added to your project with serial being the mode of communication.  As soon as you open the project LV starts pounding the serial port looking for the target and probably won't give up the port until you quit LV.  Any chance you can use ethernet port on cRIO or add a serial port to PC?
0 Kudos
Message 2 of 7
(4,291 Views)

no, thats not correct.

the cRIO has had a fixed IP via router in MAX since day 1.

The other device has always had the serial connection.

Even if the cRIO was using serial, the loopback to it should still work.

 

An extra serial port card is soemthing i dont have just laying around.

It would take atleast a week or two to come via purchase order.

Im doubtful it will fix the problem anyway.

 

Any better ideas?

0 Kudos
Message 3 of 7
(4,286 Views)
It sounds like you have a particular LV project with a cRIO target that when opened causes the serial port to stop working.  Is this correct?  If so, I would copy the project and see if the copy causes the same problems.  If it does, then I would remove the cRIO target from the copy and try it again.
0 Kudos
Message 4 of 7
(4,282 Views)

im not sure what is happening.

for now i think it is fixed.

 

I basically just tried about 5 different sets of serial port examples

some are from older labview version and some newer.

I got one that works with the crio on and im sticking iwth it.

 

Message Edited by jimmyinCT on 06-09-2009 02:08 PM
0 Kudos
Message 5 of 7
(4,268 Views)

Hi,

 

You should be able to use both the PC and the cRIO serial ports at the same time because the code will run on its own respective processor (PC or cRIO controller). The only aspect that should matter is where you host your VI in the project. If it's hosted under My Computer, it will utilize the PC serial port, and if the VI is hosted under the cRIO controller, it will use the cRIO serial port. Are your VIs hosted appropriately?

Honestly I'm a little unclear  on your problem description because I'm not sure when you refer to each serial port. Am I correct in that you want to run a cRIO application that uses the cRIO serial port and at the same time run an application on the PC that uses the PC serial port? Or are you trying to access the PC serial port from your cRIO application? Here's an example that demonstrates communication between the cRIO serial port and the PC serial port:  Serial Data Transfer Between cRIO and Host

One useful app to test successful serial communication is the Basic Serial Write and Read example in the example finder.

Misha
0 Kudos
Message 6 of 7
(4,265 Views)
Ah, just saw that you got it figured out. Which example finally worked for you?
Misha
0 Kudos
Message 7 of 7
(4,264 Views)