06-23-2021 10:46 AM
We have tried testing the NI cRIO modules hardware and programs. Currently, We can confirm that the NI hardware is working normally, LabVIEW host PC can be connected to CRIO successfully, as picture1 shows.
However, communication still doesn't establish in the programs.
We noticed that in the block diagram, a “network stream endpoint” has been created to communicate as shown in the figure below(picture 3).
For now, when cRIO is connected by ethernet, the system setting in MAX is as in picture 4.
So now we have 2 questions that want to ask:
And also maybe a specific IP address for PC?
How can we set the network configuration properly?
06-23-2021 11:58 AM
I think you may have accidentally connected the ethernet cable to your crio-9068 to the wrong ethernet port. 🙂 The "eth0" in MAX refers to the bottom ethernet port. From your LV project, it looks like you are connected to "eth1". This might solve the connection issues.
06-24-2021 03:54 AM
I expect RIObotics is right, and changing the cable is perhaps the easier solution, but you can also solve it by adjusting the IP addresses in the Network Streams address strings.
Since you might want to change this (again) in the future, consider having a single location define the remote IP address and using something like Format into String to build the connection strings, e.g.
(note I suggested in the comment you could open them in the loop, but that depends on the datatype, so probably not practical in your case with varying datatypes).
This sort of code would make it easier to switch between IP addresses.
Since you asked about allocation, you're currently using DHCP, so it's possible (although perhaps not likely, depending on your router etc) that your cRIO address will change.
Static allocation might be a better choice, because it would allow you to ensure this doesn't happen
(but then you need to make sure that IP isn't in a pool allocated by the router to something else, if it doesn't automatically prevent that itself, not sure how likely/plausible that is - the consumer-grade routers I've seen often allocate IPs above some address (e.g. 101-254) in the subnet and leave the lower values (e.g. below 100) for static IPs).
You probably don't need to set the PC's address explicitly unless you want the cRIO to open a Network Stream (or TCP connection, etc) directly to the PC (as the one opening the connection, rather than receiving a connection).
Even if you do want to do this, you could have the PC provide its current IP address to the cRIO and then have the cRIO use that to open a Network Stream (vaguely like this - a bit overcomplicated for your description perhaps, but vaguely on topic so figured I'd share):
Re the driver, no idea, but a quick search turned up http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=23452
Depending on your device, that might be relevant. If not, you might have better luck on the Delta website, look for a LabVIEW driver.