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.
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.
08-10-2017 10:59 AM
Hi everyone,
I have a problem in communication of CompactRIO 9025 with third party hardware. Let me explain you what my problem is;
I connected my Ethernet cable in between my computer and CompactRIO. I can collect data in this way. There is no problem. But when I connect third party hardware to the RS232 port of CompactRIO, I can not communicate with the hardware.
To find out what happens, I tried to make loopback testing. I shorted RX and TX pins of the RS232 and observed. But when I sent a command which is for example 5-byte, I read 0 byte from the VISA Read function and the program gave me no error.
In MAX, I can not see com ports. Also I can not see com ports on Device Manager menu.
I really do now know what is going on. Any help please?
08-14-2017 06:58 PM
Hi,
Is NI VISA installed on the cRIO? Are you using the LabVIEW example for the loopback test? look at the section "Performing a Loopback test in LabVIEW" of the following document:
* How to Do a Serial Loopback Test: http://www.ni.com/tutorial/3450/en/
add the Simple Serial.vi under the real time target, wire the serial port as explained in the tutorial, select the correct port on the VI's Front panel and run it.
Regards.
08-14-2017 09:59 PM
I installed all necessary drivers such as NI Serial RT, NI VISA RT etc. either on host PC or CompactRIO.
When I short RX and TX pins of RS232 cable and open VISA Test Panel in MAX and query, the response error on the VISA Test Panel is "VISA time out".
Also when I push the "Read Status Byte" button one the same tab, I get the error "Unable to start operation because setup is invalid (due to attributes being set to an inconsistent state)"
What am I missing?
08-15-2017 03:59 PM
You'll want to ensure you're running the Serial Loopback test on the cRIO, not on the host, as the hardware is connected to the cRIO and not the PC.
What third party hardware are you connecting to? I see a few cases in the forums where individuals seeing similar behavior were using an incorrect cable (using a straight through cable when they needed a null-modem or the other way around).
08-15-2017 10:12 PM - edited 08-15-2017 10:17 PM
you mean that my procedure is wrong? I connect my rs232 cable to cRIO and I communicate with cRIO using Ethernet cable which is connected to host PC. And then I open MAX and expand NI cRIO target and Devices & Interfaces tree, and I found ASRL1:INSTR port and I made Loopback test to it using VISA Test Panel.
Also I tried to make loopback test by Simple Serial VI that I wrote under cRIO target in Project Explorer. But when I send a command that is for example 5-byte, I read 0-byte at the "Bytes at Port" property node.
I am not sure whether I am using null-modem or straight through cable. This effects the loopback test really?
As hardware, I will use a device which is called as FADEC that was produced by aerotim engineering company
08-16-2017 03:49 AM
sefaa wrote:Also I tried to make loopback test by Simple Serial VI that I wrote under cRIO target in Project Explorer. But when I send a command that is for example 5-byte, I read 0-byte at the "Bytes at Port" property node.
I would really like to see your code for this. The Bytes At Port is almost always the wrong function. Assuming a loop back, you should just tell the VISA Read to read the number of bytes you just wrote.
08-16-2017 11:08 AM
As software, I believe that everything is correct. Because the MAX does not read as well.
I think that there is a problem at the RS232 port of CompactRIO.
Or I short wrong pins of RS232 cable. But this is not possible because I shorted 2 and 3 pins which are TXD and RXD.
If something is wrong with RS232 port on CompactRIO, what should I do? There is a C-series module that I can use instead of the port on cRIO? Any idea? I hope I could tell you what my problem is 🙂
08-22-2017 10:50 PM
The problem has been solved. The reason was just the RS-232 cable. I bought new one and tried. For now there is no communication problem. Sometimes you have to try all possible solutions to find out what happen 🙂
Well, right now I try to communicate NI PXI and SIEMENS PLC S7-300. I think to buy NI PXI PROFIBUS module. But I can not imagine physical connections and do not know how to program to collect sensor datas which are on PLC using NI PXI. NI PROFIBUS is very expensive, so I should decide the right decision. Drawing a picture can help me to imagine about what procedures I should follow.
Any help?
08-23-2017 04:55 PM
Hello! Since this is a different topic, you'll probably be better off creating a new post in our Industrial Communications pages (since you're looking at PROFIBUS communication).
https://forums.ni.com/t5/Industrial-Communications/bd-p/260