07-29-2019 01:05 AM - last edited on 07-18-2024 03:02 PM by Content Cleaner
Hi, I have developed a PC based labVIEW GUI for a dc-dc converter through MODBUS over TCP/IP communication. Now, I want to implement the same using cRIO instead of PC and let the cRIO run standalone. The converter responds well with the VI run under MY computer without cRIO but doesn't respond when run under RT target using cRIO. I am using cRIO 9045 here. I have followed the following steps.
1. Created new project with blank template
2. In the final step, I have added my VI (Converter_Final.vi and Decimal to String to Boolean.vi) to RT target as in the attached image.
Can anyone suggest what went wrong? How to add a vi to a RT target and run it for controlling the device using MODBUS over TCP/IP communication?
Solved! Go to Solution.
07-29-2019 01:19 AM - edited 07-29-2019 01:19 AM
07-29-2019 01:55 AM
Hi GerdW,
Thanks for the reply. NI MAX and LabVIEW project show the same IP address 172.22.1..2. The converter has ethernet connection at the IP address 192.168.1.20.
I didn't get any errors when the VI is run. cRIO gets connected and the VI runs without any hassle. But there is no response from the converter (since no communication is established??).
cRIO is connected to my laptop and is powered up by an external DC power supply. The converter is connected to cRIO via a LAN cable at their respective Ethernet ports.
-Sravani
07-29-2019 02:10 AM
Hi sravani,
NI MAX and LabVIEW project show the same IP address 172.22.1..2. The converter has ethernet connection at the IP address 192.168.1.20.
So they are on different IP subnets: usually this leads to problems…
cRIO is connected to my laptop and is powered up by an external DC power supply.
So you use one Ethernet port to connect cRIO and PC.
The converter is connected to cRIO via a LAN cable at their respective Ethernet ports.
So the other port is used to connect your converter?
Which device is connected to which Ethernet port?
07-29-2019 02:19 AM
How do you control the execution speed of the vi? Please attach a picture or the vi.
And how do you send the data to the pc? It might also be useful to blink a led on the rio to check it is running.
07-31-2019 09:15 PM
Hi GerdW,
Sorry for the late reply. I have changed the connections and IP addresses of cRIO and laptop. Attached screenshots of the same. The converter still doesn't respond to the VI.
Previous connections:
1.) 24V DC power supply to cRIO
2.) Ethernet port 0 to converter and USB cable from type C dual role on CRIO to laptop type B.
Connections changed to:
1.) 24V DC power supply to cRIO
2.) Ethernet port 0 to converter and Ethernet port 1 to laptop
Regards
Sravani
08-01-2019 01:54 AM
What do you see when you do interactive execution? So when you run the converter_Final.vi which is on the CRio on your PC? Then you should be able to see some debug messages if you probe the error line.
08-01-2019 02:34 AM
Hi LennartM,
Thanks for the reply. How to do interactive execution? Converter_Final.vi is dumped on cRIO and controlled using the GUI on PC. When it is run, it shows deployment successful and no errors are displayed.
Reply to previous question: The VI executes the while loop for every 1 sec. Data is sent to PC and vice versa through MODBUS using LAN cable.
Regards
Sravani
08-01-2019 03:11 AM
You should be able to open the front panel of the vi and run it. Probing is also possible. It does run a bit slower so you could get timing problems.
08-06-2019 01:45 AM - last edited on 07-18-2024 03:03 PM by Content Cleaner
Solution:
1. Connect Ethernet port 1 on cRIO to PC ethernet port.
2. Change adapter settings of PC to same subnet mask (here 169.254.22.30)
3. Make sure IP address of port 1 in NI MAX is same as that indicated next to RT target (here 169.254.22.29)
4. Connect RT target and deploy all
5. Connect Ethernet port 0 on cRIO to the converter
5. Change IP address of port 0 in NI MAX to the same subnet of converter (here 192.168.1.19)
6. Run the converter_final.vi
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x4LaCAI&l=en-US