03-03-2006 05:31 AM
03-04-2006 01:18 AM
03-06-2006 02:26 AM
Hello Najo,
Labwindows\CVI has a RS232 library, containing all functions needed for RS232 communication (look in the Library menu). If you need some example code, you can find it under Program Files\National Instruments\CVI70\samples\rs232, or launch the NI Example Finder ('Find Examples' in the Help menu), activate the Search tab and type 'serial' in the 'Enter keywords' field.
If you're still stuck, just let us know.
Success,
Wim
03-06-2006 02:26 AM
Ok,
The automat which I use is a TSX Micro (Schneider) and has a server. For my connection, I tested it outside the automat (with a console)and it's OK. Now, the problem is that, with my program, I can't connect with the automat directly.
While the automat has a server, I want to connect to it, to read/write data. But I don't have any idea about functions to use. For the moment, I'm seeing with the DataSocket functions.
Thanks for your help!!
03-07-2006 02:18 AM
Please, I'm looking for help!!!
03-08-2006 04:04 AM
Hi najo
The functions you need to communicate via RS-232 you have to look for them in "Library" and "RS-232". There you have the functions you'll need. So the steps you have to follow to communicate are:
-Open the port and configure it with the function OpenComConfig
-To read use the function ComRd. Is good that you use the function GetInQLen before reading the port, so you can know the amount of data in the buffer, and you pass it to the ComRd function.
-To write use the function ComWrt
-When finish the connection use CloseCom to close the port
Hope it's useful for you
Juan
03-08-2006 04:52 AM
thanks Juan, for information.
Just one question:
I don't need to use Datasocket functions because it bind to Ethernet or TCP/IP protocol?? (For my application, I use the Serial Modbus Protocol for the RS232)
03-08-2006 05:15 AM