03-29-2022 04:32 PM
I am able to communicate to a device in NI Max very easily. I set the baud rate and I remove all uses of the terminal character, then I can easily write to the device using the command "current=200\r". I tried to do this using VISA Configure Serial Port with the terminal character disabled. I use the same command and it doesn't work. I also tried enabling the termination character and changing it to 13 (to represent \r) and using the command "current=200" and that hasn't worked either.
03-29-2022 08:46 PM
You have to give the port time to send the data. You are currently passing the command to the port's buffer and then immediately closing it.
04-01-2022 12:08 PM
Thank you for the suggestion, unfortunately that didn't work. I added a time delay of 3 seconds and I tried removing VISA Close completely.
04-19-2022 02:18 PM - edited 04-19-2022 02:26 PM
If you put the 3 second wait in the simple VI, it won't necessarily wait when you need it. Try putting the steps in a flat sequence structure, with the VISA initialization in one frame, the send in the second frame, the wait in the 3rd frame and the VISA close in the last frame. 3 seconds is too long. 500 ms is suitable. Also, why are you not using the default termination character?
04-20-2022 01:10 AM
You could start with this example from NI :