LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

generic commands at serial port

i need to send a query command to several devices
and to check the input buffer to see if the communications at the port is good.Someone knows some command(generic enough) that all devices may to decode and to respond to perform this task.
0 Kudos
Message 1 of 6
(3,942 Views)
Hi,

What interface do you use to communicate with these devices? If they are serial connections (or RS232) you can use VISA library functions. If they are ethernet based you can use TCP/IP. Tell me a little bit more about what kinds of devices you are communicating with and how they physically connect to your machine.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 6
(3,942 Views)
As a fact the devices on what the serial must to connect and to check the response are proprietary devices(box) used to programming the phone and testbox
as a whole.if i use the visa commands how to insert it in my code.
0 Kudos
Message 3 of 6
(3,942 Views)
Hi,

In order to use the VISA functions you must make sure that your serial ports are specified in this part of the registries.
My Computer\HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM
If you see your serial ports in there, then you can use the VISA functions. You can find the functions in the VISA Function Reference Manual

NI-VISA Programmer Reference Manual
IF not, here is a link to a document that explains how to program in CVI serial communication.
Serial Communication Programming
Hope this helps.

Ricardo S.
National Instruments
0 Kudos
Message 4 of 6
(3,942 Views)
HI,,

here goes my code,could someone to make some view to see if there are any errors.since now i please by answer.the purpose is to send the command(through com) using visa to see if the comunications on the serial port is good.please just consider the module that tests the serial port 1,because if is it good i will to reply to others ports the code(that are separeta by asterics).
Download All
0 Kudos
Message 5 of 6
(3,942 Views)
Hi,

I could not check the files because the c code was not included. On the mean time, you can check the shipping example called "serial". You can find it in the following path:
C:\Program Files\National Instruments\CVI70\samples\rs232
It does what you want to do.

Ricardo S.
National Instruments.
0 Kudos
Message 6 of 6
(3,942 Views)