05-12-2025 12:08 AM
I'm having some problem with xnet communication.
my code looks perfect to me. and by my thought it should work properly.
However when I check with xnet bus monitor. Xnet write and read is not working at all.
Can somebody tell me what is the problem?
05-12-2025 01:44 AM - edited 05-12-2025 01:45 AM
Hello,
your code continuously create and dispose the XNET connection. 2 XNET sessions are created every 100 ms.
Move the XNET session initialization VIs and the clear vis outside the loop. Just keep the 2 VIs read and write inside the loop.
The image below shows an example. Please note that it's just an example. It isn't a fixed version of your code.