Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. A perfect moment to dig out a thread , just a few days before its 10th birthday. I made dis: https://labviewwiki.org/wiki/Heap_Peek And happy birthday, thread!
  4. this is a little ambiguous. Header Type Length Report ID Data Check Sum...Makes sense if you put commas in the right place Header Type, Length, Report ID, Data, Check Sum. If that was the case then a msg with no data would be something like 7E 03 02 18 9B Is this your interpretation or is it stated as such? Usually a checksum is a CRC. if it is a CRC-8 (there are a number of 1 byte CRCs) then the last value would be 0x29 rather than 0x9B, for example.
  5. If you know there are no more bytes in the buffer, then you can ignore that error. That is, if the packet size is fixed, and you are receiving correctly, you don't have to reach the timeout. Also, you can set the timeout to a value less than 10 seconds, if you know that all transactions occur before the time is up.
  6. Yesterday
  7. hoovahh, Tried your software... It's for an different version UPS and the protocols are different. That said I just modified your software with the current protocol commands and I get the same results, read function times out. I'm leaning toward my problem is not software related, but hardware. Probably the USB to RS-232 converters I'm using. I just had a wild thought and tried to connect to the UPS using my USB to RS-232 converter and their PowerAlert software. Of course there are variables they ask you to select the communications protocol and the protocol they sent me (4001) isn't listed out of the probably 30 protocols in their dropdown. I selected a couple that sounded right but I can't connect with their software on this port either. Crossrulz, I'll ohm out the cables they sent to see if anything looks bad. Everyone, Thanks for looking and trying.. It's just really hard working from home without the proper resources to get the job done. Bob
  8. Bryan, Ok... I've always said there are no stupid questions... It's protection for me when I ask that stupid question.... I looked on the back of the unit and there is only one DB9. You're right about the "dry contact" connections. They are confusing, but Tripp-Lite tech support assures me I can communicate serial on the DB9 connector. I agree, the manual, protocol documentation and tech support for purposes of software aren't very helpful. Bob
  9. That manual also mentions "included cables". You might want to ohm out that cable to see where pins are actually going.
  10. I do believe the baud is correct at 2400. In another thread I showed OP some code I wrote here which interfaces with a Tripp Lite UPS, which worked on the ones I was using.
  11. I just looked up the owner's manual for that UPS (https://www.tripplite.com/support/owners-manual/45875). If you look at Pg 6, it looks like there are 2 DB9 connectors on the back... is yours like this? (Stupid question: Are you plugged into the right one?). Also, on Pg 12, it mentions "dry contact" connections under USB and RS-232. It's kind of confusing, but it looks like it could possibly be using a mixture of contact closure and RS232 communications on one cable... this seems unusual (and I may be reading it wrong, I'm in a hurry), but if that's the case, connection of anything other than pins 2 and 3 to your computer could be causing issues. What concerns me is that pin 5 is normally used for communication ground, but the documentation looks like it says that the contact closures are using those pins as well as pin 3. I'm wondering if the DB9 connections aren't intended for serial communication. Some devices will show up when plugged in via USB as a Serial Device with a COM port assignment (may require a driver installation from them). Perhaps that's what they mean by serial/rs-232? If so, their documentation (that I've found anyway) isn't very helpful. I also just noticed that your baud rate in picture above is set to 2400, which isn't typically common on modern serial devices anymore. 9600 used to be the norm, but I've seen 19200 and 115200 commonly used on devices as well. I've never interfaced one of Tripp_Lite's UPSs before though.
  12. You're right, either the UPS isn't GETTING the command, isn't UNDERSTANDING or is IGNORING the command or is responding and it's not making it back to the computer.
  13. I work with those CURSED USB to RS232 adapters nearly every day and have had a whole range of different issues with them. I won't get into it all here, but here are the troubleshooting steps that I typically do in no particular order: 1. Jumper the Tx and Rx pins on the connector closest to your device to form a loop back (pins 2 and 3). 2. Use PuTTY or some other method to send data out, you should get the exact same data back. If you get data back, then you're communication is making it round-trip to at LEAST the connector of your device. 3. Try a null-modem cable/adapter, which swaps the Tx and Rx pins between one end of the cable to the other. Sometimes manufacturers don't make it easy to figure out if it's required. 4. Double-check to make sure your Baud rate, data bits, stop bits, parity and handshaking have been configured to match what the UPS is expecting. It looks like you're specifying a termination character for READ (For the initialization, 0x0A), but not enabling it. If the UPS requires a termination character, you'll have to explicitly send one with writes, it doesn't automatically append. If the UPS is expecting it, you may have to add an "0A" to the end of your hex string. 5. Look in the documentation to find out if the UPS requires any special termination characters, start/stop, etc characters - I.e. is what you're sending properly formatted? I've had devices which required unusual starting and termination characters before, with or without the common "0x0A termination character. 6. Your VISA Open timeout is zero, try adding something a little longer... possibly 50ms to 250ms or so.
  14. Crossrulz, The UPS model # is SU750RTXL2U. I have the programming protocol from Tripp-Lite and I would post it here but it clearly says at the bottom of every page "All technical information contained in the document is the exclusive property of Tripp-Lite and may neither be used nor disclosed without its prior written consent." That said the protocol document is very vague, in my opinion it leaves out some very important information. As to the string I'm sending (hex) 7E03 0218 009B. 7E is the header and will always be ~ or 7E, 03 is the type (01=Command Rejected (UPS -> Computer), 02=Command Accepted (UPS -> Computer), 03=Polling Command (Computer->UPS), 04 Set Command (Computer -> UPS), 05 Data Returned (UPS -> Computer). 02 is the length (number of bytes from Report ID to Data), 18 is the report ID (in this case 18 is inquire input voltage) 00 is the Data portion in this case no data, 9B is the check sum which is the sum of bytes from header to data. As to the string I would like to receive it should be 7E05 0318 B004 52 the data portion is B004 which should be 1200 or 120.0V OK, with all that said. I'm getting a timeout from the read function. I think this means either as you say I'm sending an invalid command, or the UPS isn't receiving the command string at all. Wish I could determine which it is. Still wondering about the USB to RS-232 converters I'm using. Thanks, Bob
  15. 1. Make sure you are actually following the protocol of the UPS. What is the model? Do you have a link to the programming manual (might also be in the User Manual)? 2. If you send a binary string to the UPS, I almost guarantee it will not spit back "120.0V". It has a protocol defining the message format. Since you are getting no data back, I am left to assume you are sending an invalid command. Though, it is also possible the UPS is using a different pinout than you expect for the RS-232 connection.
  16. Crossrulz, What do you mean by "Then you need to read using the protocol of the device" The read buffer is always empty. When I send this polling command the response from the UPS should be 7E05 0318 B004 52 the data being 1200 or 120.0V Thanks, Bob
  17. Since it look like you are sending binary data, you really should turn off the termination character at the VISA Configure Serial Port (Boolean input on the top). Then you need to read using the protocol of the device. This should involve reading a start byte, message ID, data, a checksum of some type.
  18. Here is another snipit showing all the inputs and outputs. Although the Tripp-Lite documentation doesn't address termination characters, I've tried it with and without. I've used bytes at port and just asking for a large read, neither works All the VI's run without errors until the Read function which in this case it gives warning about Bytes read equals bytes requested... There may still be data on the bus. Without using the Bytes at port and asking for 50 to 1024 bytes the error is a timeout. The write return count is 6, read return count is 0 I appreciate your help... More then likely in the end I will have missed something stupid... Thanks again, Bob
  19. You did not address the other mentioned issues. Assuming that the return data is constructed in the same way than the command you would need to read 3 bytes, decode the 3rd byte as length and read the remaining data + any CRC and other termination codes.
  20. I'm having difficulty communicating with a Tripp-Lite UPS via serial RS-232. One variable I need to rule out is the USB to RS-232 adapter cables I'm using. I seem to remember there being some chip sets that didn't work well so I thought I'd ask the group. I've tried two different cables. The SABRENT Model CB-FTDI using the FTDI chipset and the UGreen using the Prolific PL2303 chipset. Does anyone have any experience with these cables? Any cables/chipsets you have used before without problems? I'm heading down this path because when I send a command that should ask the unit what the input voltage is I don't get any response at all from the UPS. In fact it doesn't matter what command I send, I get the same results. The config vi runs with no error, Open and write also run without errors, when I use bytes at port it returns 0, above I just ask for 1024 but the results are always the same, the read function times out with an empty read buffer. I think next week I'll go into the lab and try using the PXI-8430 and a straight through serial cable. I just really think this should be working... Does anyone see anything I'm missing? Thanks, Bob
  21. It's always a good idea to show the code indication (Display Style) on a string constant! Serial Port Initialize by default enables the message termination protocol. That is for binary protocols often not very helpful. And in that case you need to get the message length right such as reading the header until the message length, decoding the length and read the reminder plus any CRC or similar bytes.
  22. Yes you are right, using the RS232 com port does not utilize HID Protocol. On these UPS's if you want to use the USB port it uses HID protocol. Don't fully understand why they would make it different on the USB port. I also agree using the RS232 port should be easy... But it's not. And that may be my fault. Working from home I don't have all the accessories I have at work. For instance since I can't communicate at all, I don't know where the fault lies. Is it my formatting of the string I'm sending, is it the USB to RS232 converter, is it something I'm not even thinking about??? My next step is to go into work and use a PXI-8430 to eliminate the USB cables. Just straight serial cable to the UPS. If that doesn't work I'll really be lost. I didn't state in my previous post when I write to the port it always returns 0 bytes at port and the read function times out. Any thoughts would be appreciated... Thanks, Bob
  23. That would indicate a USB VCP, not USB HID! While the format is indeed not very descriptive as you posted, a USB VCP should be easily accessible through NI VISA.
  24. Last week
  25. Hey drjdpowell, Thank you for the feedback and yes good question... I think my intention is to try and combine good features from the two frameworks rather than try to mesh them together in their entirety. I think the idea of a broadcast from a generic child module up to a generic parent module through a user event is solid (DQMH has this feature by default). My team/customers familiarity with the actor framework is also good. A little more digging led me to a package on VIPM called the "Event Source Actor" which might already do what I'm trying to do (but better). I think I can take a stab at posting this in the AF forum as well but may have found my answer. Thanks again! -John Hoehner
  26. very vague. I was going to enclose it, then I read I can't. This pretty much covers configuration: RS232 Configuration: Baud: 2400 Data: 8 bits Parity: None Start Bit: 1 This pretty much covers message format: Message Format(Binary): Header Type Length Report ID Data Check Sum, Header 1byte, Type 1 byte, Length 1 byte, report ID 1 byte, Data 64 bytes max, Check Sum 1 byte. As I understand it the header is always ~, (7E) the type is 03 (Polling command), the length is 02 (the number of bytes from report ID to data), Report ID 18 (inquire input voltage) no data so 00 and check sum is 9B (sum the bytes from header to data) When I send (hex) 7E03 0218 009B it gets through write, but bytes returned is always 0 and read buffer is always empty. It would seem to me the UPS is not understanding the command or it's not really being written to the UPS. I'm working from home on a laptop, so I'm using a USB to RS232 cable, I've tried two versions one from SABRENT and one from UGreen neither seems to work. Tripp-Lite told me I didn't need a null modem. So I appreciate that. Honestly I just noticed Message Format(Binary) so I attempted to send the request for input voltage (hex) 7E03 0218 009B as binary but that didn't work either. As of now I'm uncertain do I have a problem with the USB to RS232 cables, the formatting of the command, or just something stupid I'm missing. I would bet in the last one, I'm missing something stupid. Tripp-Lite refuses to get involved in any way with programming issues... Of course.... Thanks, Bob
  27. The two people who gave this presentation might be able to point you in the right direction.
  1. Load more activity
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.