09-10-2008 06:02 AM
Dear all,
I want to communicate between COM1 and COM2 in a PC. I prepared a document which explains the test setup which I have planned to control the simulator using a 32 bit Micro controller through PC.
Please help in this regard. Thanks in advance.
09-10-2008 08:41 AM
09-11-2008 12:44 AM
Dear Mr Knight,
Please read my com1_com2.pdf in my post. How do I synchronize COM1 & COM2 so that the data received from COM1 can be sent on COM2. Please go through my pdf document.
Please help in this regard.
Regards,
Thulasi
09-11-2008 08:38 AM
Sorry I misunderstood.
First, I would recomend either a pci or USB GPIB controller instead of the serial->GPIB converter. There is not much of a price difference and you will have something that is faster and easier to use.
As far as reading from com1 and then sending the commands to the GPIB instrument, that would seem to be pretty straight forward. You would have a loop that is constantly reading com1 and looking for valid data. This data would need some small processing to format it into commands that the GPIB instrument would understand and then this command would be written to the instrument. Apparently, you don't have any software yet for this and I am obviously biased towards LabVIEW. In LabVIEW, the while loop would use an API called VISA for both the read and write functions. With the VISA api, the program would not card whether you used the serial->GPIB or a true GPIB controller. VISA works with both.
09-12-2008 05:49 AM
Dear Mr. Knight,
Thank you for your reply. You said in earlier message that
"You would have a loop that is constantly reading com1 and looking for valid data. This data would need some small processing to format it into commands that the GPIB instrument would understand and then this command would be written to the instrument".
Can I use C language to do the above task ? I mean, Can I read the COM1 port, process and format the command and send it across COM2 to USB-GPIB to simulator using C language instead of LabView ?
I am sure that am missing some detail like how to send the commands to COM2 once I receive a message/byte on COM1.
Help in this direction would be highly appreciated. Thanks.
Regards,
Thulasi
09-12-2008 08:45 AM
09-12-2008 09:15 AM
Dear Mr Knight,
I just wanted to know is it possible to control the simulator with help of GPIB-USB convertor and C language. Or do I need to use LabView also in addition to GPIB-USB.
Please throw some light, so that I could just purchase GPIB-USB convertor and try writing c program to read from COM1 and process it and format it to a command and send it to Simulator.
Thanks.
09-12-2008 09:23 AM
To repeat - "Sure, you can use any programming language you like". Put more plainly - YES!
When you get around to buying a GPIB controller from NI, you will get a CD with the driver and you can install examples - including examples for C.