LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot read UPS through USB

Hi folks,

 

I'm unable to recieve any communication from my UPS battery backup in LabVIEW.  The only info I need from the backup is true/false if the power is out.

The UPS model number is UPS RS 1500G by APC, and it is connected through USB.

 

I've tried reading the kernel32.dll, but it looks in the PC for the battery, not in the backup.  I also tried the example posted here - https://decibel.ni.com/content/docs/DOC-1154, but it is looking in kernel32 as well and isn't finding my backup.

 

I'm able to monitor the UPS with the PowerChute software, but I'd like LabVIEW to do the monitoring for me...

 

Has anyone been able to get something like this setup?

 

I'm using Windows 7 and LV 2013.

 

Thanks!!
Christopher

0 Kudos
Message 1 of 13
(4,317 Views)
What is the type of USB connection? There is no universal type as you should know so check the type in Windows device manager. It could be hid, serial, or something else. What type are you assuming?
0 Kudos
Message 2 of 13
(4,312 Views)

I believe it is HID.

 

Thanks,

Christopher

0 Kudos
Message 3 of 13
(4,308 Views)
You shouldn't have to guess.

You would need to use the Call Library Node to access hid.dll. Hopefully, you did not use the VISA Wizard to make the device visible in MAX. You will need to get programming information from the vendor in order to get the correct parameters for the hid interface.
0 Kudos
Message 4 of 13
(4,305 Views)

No, I havn't used VISA for this device.  Does anyone else use this type of battery backup with LabVIEW?

 

Thanks,

Christopher

0 Kudos
Message 5 of 13
(4,301 Views)

I'd be very surprised if this doesn't show up as a VISA device.  Open Windows Device manager.  Look under Ports and see which ones are listed.  Then plug in the device (or unplug it) and see if the number of ports change after it refreshes.  If it does look at the port that gets added/removed.  Assuming one does get added/removed, then this is the COM port to use in VISA calls to talk to the device.  How do you talk to the device?  You'll have to ask the manufacturer but there is likely a list of serial commands to request data from the device.

 

In the past I have ran a serial sniffing program that would look at the serial data going to and from the device.  I then would run the application by the manufacturer which reads data.  I'd then have the serial commands for getting data and I would then re-implement it in LabVIEW, if no documentation could be found.

Message 6 of 13
(4,275 Views)

@Hooovahh wrote:

I'd be very surprised if this doesn't show up as a VISA device.  Open Windows Device manager.  Look under Ports and see which ones are listed.  Then plug in the device (or unplug it) and see if the number of ports change after it refreshes.  If it does look at the port that gets added/removed.  Assuming one does get added/removed, then this is the COM port to use in VISA calls to talk to the device.  How do you talk to the device?  You'll have to ask the manufacturer but there is likely a list of serial commands to request data from the device.

 

In the past I have ran a serial sniffing program that would look at the serial data going to and from the device.  I then would run the application by the manufacturer which reads data.  I'd then have the serial commands for getting data and I would then re-implement it in LabVIEW, if no documentation could be found.


APC use their own proprietary USB interface. They have two classes, the Smart line which seem to use a USB-HID based interface and the others which have a very primitive USB interface that only about support battery charging, discharging and empty status.

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 13
(4,271 Views)

@rolfk wrote:

APC use their own proprietary USB interface. They have two classes, the Smart line which seem to use a USB-HID based interface and the others which have a very primitive USB interface that only about support battery charging, discharging and empty status.


I did not know that.  Now that I got back to the office I found the UPS I was talking about was a Tripp Lite.  I contacted the manufacturer and eventually they sent a data sheet on how to request UPS status.  This was after I reversed the messaging myself, but oh well.

0 Kudos
Message 8 of 13
(4,230 Views)

Hooovah-

 

I am also dealing with a tripp lite.  I received the protocol 3005 pdf from tripp lite, but I don't understand where to go from there.  Are these "opcodes" the data to send to the UPS via a USB HID dll call or something?

 

Thanks for any info!

-pat

 

edit: http://digital.ni.com/public.nsf/allkb/8FD4C1DC8E80637E862572EF00784338  <----- is this the right direction to go in here?

0 Kudos
Message 9 of 13
(4,106 Views)

Could you link to the PDF you mentioned?  I'm not familiar with the Tripp Lite UPS acting like a HID, as I mentioned before all of mine had a DB-9 for serial communication.

0 Kudos
Message 10 of 13
(4,094 Views)