02-23-2023 03:04 AM - edited 02-23-2023 03:07 AM
What VISA resource name string are you using?
I suspect you might be using an ASRL::INSTR resource name rather than USB::INSTR
And your reporting is confusing:
First you say every second command works.
Now you say it only works if you first open NI Max and send a command and then it works always in LabVIEW.
Which of the two is it?
02-23-2023 03:34 AM
Looking at the code I see this:
Solution: set the string constant to "\ Code display", then remove the leading backslash and set the type of the cast to U8, so 10 can come out, the desired value of \n.
02-23-2023 05:01 AM
I can't look at the VI itself as I don't have 2021 installed anywhere currently. But if that is in there, that certainly would explain a possible problem.
02-23-2023 06:02 AM
For Rolf:
02-23-2023 06:42 AM
I use this: USB0::0x1AB1::0x0E11::DL3A200200113::INSTR
Also the checmatic above was only a try
In the moment I use the attached one
And yes, it is confusing sometimes I have to start it twice after I have done it in NI Max
and sometimes it works for every meassage.
If it works then it is also possible to send the meassage without \n or ;
I tried this several times and there is still no solution
Every time if I think now it is solved then the next day is the same problem
Attache dis the file that I use
02-23-2023 07:30 AM
When having issues with USB, the first thing I do is go into the Device Manager and go through all of the USB hubs to ensure the "power saving feature" of letting Windows turn off the hub for whatever reason is unchecked. I've seen too many USB devices get reset because Windows randomly decided to turn off that hub.