-
Serial Program카테고리 없음 2020. 2. 16. 10:15
Hello, I have looked at all the NI examples on serial ports and a lot of other forum posts; I can't find anyone that has written a program where the serial port is not opened when the program starts, then within the program are able to open and close the port however many times they want without closing the main program. The program I'm creating will be compiled to an EXE and ran in the field and needs to talk to multiple sensors that plug in via usb and operate as virtual serial ports. I would like the user to be able to run the program, then choose serial ports based on what is available in windows and open them one by one.
I have figured out how to open the program then open the serial port, but I can't quite figure out how to close it, then re-open it. I have something like this:I've seen so many different ways people do serial ports in LabVIEW that my brain hurts. I know this code could be cleaner and I will clean it up after I figure out this open/close goal.
Free Serial Number Activation Keys
If anyone wants to recommend a completely different way to accomplish(structure wise). Go for it; I'll try and re-post. OK, I am definitely going to look into Queued Message Handler as I'm seeing that in other more complicated examples like the Modbus Master/Slave examples, but for now I got this working like I want for opening/closing the serial port. It works great, thank god for being able to re-call the VISA serial even after the port is open, and the VISA close even after the port is closed. Now my only problem is handling the read timeout error. All work great unless I don't get a response from the arduino. I want to be able to trap this error and display a 'No Response' indicator to the user.
I've seen examples with switches, cases, but this is the simplest I've seen and I want it to work so bad. Can anyone tell me if this should work like I suspect.
Advanced Serial Port Terminal is a must-have tool for every developer and programmer. This session-based multi-purpose application lets you connect to any serial port device to check, troubleshoot or debug its work and connection.
Our terminal is much more functional than standard Windows Terminal, as it is able to send/receive various types of data (ASCII string, binary, octal and hexadecimal) over a serial line, redirect input/output data streams into a specified file, troubleshoot and test modem settings, etc. Using Advanced Serial Port Terminal you will be able to change serial port settings without the need to close and reopen the serial port, adjust baudrate, databits, parity, stop bits, flow control parameters; save all received bytes into a file for later analysis and lots more. Send, receive and view data in hexadecimal format, switch between dump and terminal view modes: all of these features are very useful for debugging and testing serial port connections. You can work with several COM ports at a time. Change the settings of every port you are working with on the go, save all sessions' parameters and load them every time you launch Advanced Terminal.
You can switch between terminal and data views that ensure the most effective way of communicating with serial port device. The same way you can test any software that uses serial com ports and is located on the remote computer. Advanced Serial Port Terminal will connect to the remote computer via null modem cable or TCP/IP protocol if LAN is enabled. Advanced Serial Port Terminal provides you with all functionality to test, debug, troubleshoot and tune serial port devices and rs232 connection.
You can simply check the work of hardware by sending various types of commands to it. Moreover, save all data streams into a file in order to analyze it later. Advanced Serial Port Terminal allows you to send and receive binary data via X-modem, save history of all typed commands for all opened sessions, view all data that has been sent, send special characters to modem and lots more. Full features listOpen any number of serial ports simultaneouslyDynamically change communication port parameters without necessity to reopen itView incoming/outgoing data in hex formatSwitch between terminal and dump view modesSend data blocks in various formats (ASCII/ANSI string, binary, octal and hexadecimal)Redirect incoming data stream into a text fileSave configuration parameters for further usageConnect to remote computer using null-modem cableConnect to any number of serial port devices (including virtual ones)Send ASCII file to remote endSend/receive files using X-modem protocol.