LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is it necessary to use a rs232 interface?

Hi, I have a AL104 mass scale and I'm trying to read the weight on labview, I hook it up to the computer using a rs232 cable, but I don't really understand how the device and the computer is communicating, I use VISA to write the program, but I can't locate the resourse name (address of the input) . Some one told me I might need to use a rs232-GPIB converter, because the computer is not detecting the hardware. I want to ask, is it necessary to use a converter in order for the computer to send and receive signal from the device? becasue it seems to me that even the pc and the device is connected thru the cable, the data still not transfering between the two... or how do I check the computer knows the device is "attached"??
 
Really appreciate if someone can go thru what I should do from the beginning to when I'm able to read the output from the computer!!!
 
Thanks!!
0 Kudos
Message 1 of 14
(3,709 Views)
"resource name" will only be found automatically by Measurement and Automation Explorer for GPIB devices.
If your device only has RS232 as an interface then it wont show up in your device list as a resource.

This doesn't mean you can't communicate with it.
You just need to do the comms manually. I.e. not using a MAX device name but a default VISA resource name like COM1.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2 of 14
(3,705 Views)
RS-232 and GPIB are two different things.  Looking up AL104 by Google, I came across this page that as a link to the manual  http://balance.balances.com/scales/1114
 
The manual shows it is using RS-232.  That means you write a command to the Com port and read back the response.  There is no hardware to detect.  Your VISA port will be whatever com port you have it connected to.  Com1, com2, ....
 
That manual told to look for the command set.  I found this link   http://us.mt.com/mt_ext_files/Editorial/Generic/1/PL-S_SICS_0x0002467000027246000b531d_files/B-S-AL-...  That should tell you all you need to know about communicating with the balance.
0 Kudos
Message 3 of 14
(3,700 Views)
Thanks Troy and Raven, but I have one more question... if i don't need a resource name, is that mean I don't even need to use VISA OPEN and can just type COM1 in the write buffer??
0 Kudos
Message 4 of 14
(3,667 Views)

Com1 is the resource name. If you don't explicitly call a VISA Open and just pass the resource name to a VISA function (i.e. VISA Configure Serial Port, VISA Write, etc.), then current versions of NI-VISA will automatically open the resource. Even if you do it this way, it's still a good idea to do a VISA Close.

All of the shipping examples for serial show just calling the VISA Configure Serial Port without doing a VISA Open. I would not recomend skipping this.

0 Kudos
Message 5 of 14
(3,663 Views)
right now i have visa open -> visa write -> visa read -> visa close -> error....  but the weird thing is under the resouce name, there is no COM1 or COM2....only couple GPIB address ( other machines that conntected to the computer)... is that mean the rs232 cable is not working properly? or do i need to go to control panel and do the "install hardware"??
0 Kudos
Message 6 of 14
(3,660 Views)
Go to Windows device manager.  Check on the serial ports from there.  See if there are any problems with their driver.
0 Kudos
Message 7 of 14
(3,655 Views)
Do any com ports (as either 'Com' or ASRL) show up in MAX? If none are listed there, then there is probably something wrong with the serial driver. Are you using a built-in serial port or a USB-RS232 converter?
0 Kudos
Message 8 of 14
(3,653 Views)

The computer I'm using has a build-in serial port, and I am not using any converter, because the rs232 cable should be able to do the transfering by itself.... am I correct?.....  and the MAX you refering is the DAQ-mx, right? I'm not using that either because there is no DAQ board connected to the computer.  I just tried typing COM1 in the resource name, but still not working...

 

0 Kudos
Message 9 of 14
(3,631 Views)
No. MAX is Measurement and Automation Explorer. It should be on your desktop (Also Start>Programs>National Instruments). Start it up and over on the left side (under Configuration), you should see a Devices and Interfaces. Expand this and see if there is listed Serial & Parallel. Expand this and see if there is anything listed there. Also expand the Software listing and verify that NI-VISA is listed.
0 Kudos
Message 10 of 14
(3,629 Views)