LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication Bus

Solved!
Go to solution

Dear Friends,

 

I am using the following the communication RS232 BUS for communication between the device and the NI PXle-1078 deck box. 

 

I have encounter some concern over the use of this cable:

a. , I have connected my device to deck port (name is same Com port 1) in order to get easy and quick response response rather than connecting to the COM port 1 on the bus. (Bus here is the multiple com port cable as shown in the picture)

b. Whenever I connect my device to the com port bus, it never detect the correct port, I need to unplug and switch my com port connection to different com port  on the bus (there is sometime swap of the com port number). 

c. Many time my device fails to get detected on the com port bus.

d. Is there anything. I should take care before connecting my device to this com port bus (Like restarting the computer, adding delay time or anything which will make my programming effort easy)

e. Is it corrupts or not working: How can I check that.? as well as If anyone can share it name it will be great, I don't have any idea what is it called?

 

23.jpg

 

0 Kudos
Message 1 of 5
(1,706 Views)

What are a "deck box" and a "deck port"?

 

Are you asking for how to sort out which of the blue RS-232 ports are which?  Once you figure that out, why not label them?

 

What device are you connecting to this?

 

Is your problem that you connect your device, don't know which port you plugged into since they are unlabelled, and then need to move them around until you stumble upon com1?

 

You could write you program so that it sends a message to the device on each of the com ports.  Once you get a response, then you know which com port you are connected to and can use that port in the rest of your program.

0 Kudos
Message 2 of 5
(1,661 Views)

Did you assign the ports in Device Manager?  What I did in my last system was setup Port 1 on PXIe-8430/8 to be COM11 and then incremented from there.  I just let COM1 continue to be the port built into the controller.  From there, I know what port I am connecting to.

 

And just a stupid question: Are you use you plugged the right cable into your RS-232 card?  I just see a rat's nest when looking at your setup there and many devices use the same connector.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(1,654 Views)

Hi,
Ports are proper labelled physically and they are connected through the single cable having muliple com port as input for the device and single output is connected to the deck (Just say "com port bus" for simple understanding). We have such cable only for connecting muliple device to the deck.


Problem: a. Sometime com port swap upon the restart of computer or unplug of the device from the com port bus. (Many time it shows on the labview it is reading from the com port 4 but actually in phyically it is connected to the other port). Dont know how to fix this?


Problem :b. In fact swap of the port is manageable but whenever I try to connect multiple device using this com port bus, it start to cause the problem, it read one device at the time which in most of time it is com port 1 of the bus or deck port (90% times) or it doenst read or throw the error for delay or something. I tried to add wait ms and still it doesnt work. Consume alot of time to just find the correct port for measurement


Could you please share the program, I have no idea, how can write program, just to check which port is working in fact I need to connect 10 device or more to check which one is working exactly!

 

 

 

 

 

23.png24.jpg25.jpg26.jpg

0 Kudos
Message 4 of 5
(1,632 Views)
Solution
Accepted by topic author skdubey

Again.  The word "deck" means nothing like the way you are using it.  I'm going to assume you speak another language besides English and are offering a bad translation.  So go ahead and call it com ports.  Or since you circled I/O connectors in the one picture, just call it a connector.  If you are talking about the entire box, that is a "chassis", and the cards inside of it are called "modules".  Hmmm.  maybe that is the problem, you are translating "cards" to "deck" as if it was a deck of cards?

 

I don't have any program to share.  After all, it is YOUR program.

 

No, you don't need to connected 10 devices.

Get a list of all serials ports your computer sees.  There is a VISA function called Find Resources or something like that.

 

Go one by one through the array of resources and send a command to that com port and see if you get a response back.  The command to send will depend on the device which you haven't told us about.  If nothing is connected to the com port, no problem, you'll just get a timeout error.  You could open the port with a shorter timeout value so that you don't have to wait the full 10 seconds for the default timeout value.  How large of a timeout value you set will depend on how long it takes for the device to respond under its most extremely delayed circumstances.

 

Since you are opening different serial ports, you can probably do this with a For Loop set for parallel execution.  That way you don't have to wait up to 10 times 10 seconds if you were tried to query all 10 ports in series.

 

But overall, I don't think you really have as big of a problem as you think you do.  Once that 8341 module is installed, there is no reason for the com port numbers to jump around.  The device manager picture shows that your 16 ports are assigned com4 through com 19, and it even tells you what port number is which that is on the connector.  So if you plug a device into the connector that says "port 7" for example, you know that should be com10

 

0 Kudos
Message 5 of 5
(1,618 Views)