10-23-2019 08:52 AM - edited 10-23-2019 08:56 AM
Hello Everyone,
I am trying to deal with this error for almost a month and whatever I read and I tried wasn't helpful.
My computer(MBP 2015 with bootcamp, working on the win10 side ofc) recognizes it at device manager & installed the driver correctly(it seems to me) in NI-MAX I can see it under "Devices and Interfaces" section. So far so good, when I open visa test panel and "write" function works but query and read is giving this error(VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.)
I tried the standard pre-prepared messages that are in MAX and also I tried standard messages that are written on the inverter's manual which is in hex format.(0103491500018392 - Page 244 in Inverter Manual Link )
I am not able to read anything or get response from my inverter with any software(Labview, putty, hercules, device monitoring studio) other then the proprietary software of GEFRAN which is GF_Express. With the proprietary software I can read and write parameters which I think indicates the hardware-wise transmission is working.
Also I connected an oscilloscope to the pins of rs232 end checked whether anything is being transmitted. Which verified that the message that I compose is being transmitted in the right way and in the right format(11 bit packages) which is required by the MODBUS RTU protocol.
Below I am attaching my VI, I am NOT sure about the end character but in modbus case the end of a binary message is the idle state(not transmitting anything for 3.5ch time frame) options but I tried with almost in every option which did not yield anything other then the timeout error.
Apart from this I tried 2 other rs485 adapters and they are recognized by visa and max but giving the same error plus the proprietary software can not connect at all.
My hardware is as like in the picture. From left to right the adapters are; Left end is USB to RS232, and then PCI Express is a RS232 to RS485 adapter and the last big adapters are just to re-arrange the pin arrange in the right way. Finally the black cable on the right goes to the Inverter's RS485 entrance.
Link to the Manual of the Inverter's proprietary software
MODBUS RTU AND ASCII protocol manual
I hope I can get this serial comm working and start doing the fun stuff which is rotating the PM motor and tryIn the end setup should be smt like above diagram eventually but I can not even communicate with one inverter. and RS232 can have just one slave so I need to get rs485 adapters working if I want to connect to two slaves.
I really hope I can get this done and troubleshoot this problem, it's kinda demorilizing getting stuck at the same place for a long time.
Thanks in advance.
Arda
Solved! Go to Solution.
10-23-2019 08:58 AM
I don't see where you are sending any Modbus messages. All I see you doing is writing a byte of value 1 in a string control called slave address.
Have you tried using the Modbus libraries that are built into LabVIEW under the Data Communication palette?
10-23-2019 11:28 AM - edited 10-23-2019 11:35 AM
first vi's are useless since I can not change the message(smart property) I just updated version of my vi is below, no I haven't tried the modbus libraries I just discovered them today and will make a vi with them too.
10-25-2019 09:01 AM
last version
10-25-2019 09:27 AM - edited 10-25-2019 09:31 AM
I'm not sure what an MBP 2015 is, but have you tried on a real Windows based PC? I'm wondering if the bootcamp program is interfering with communicating with the serial device drivers.
Your command is set for slave address 2. Is your device set up the same way?
It's possible you have an issue in the long string of adapters there. Do they provide any software to communicate with the device, and is it working with the cables and adapters you have?
Also, you will really want to use a Modbus library as I said earlier rather than pure VISA calls when you get beyond this test phase as it abstracts out the details of the messaging protocol.
10-25-2019 10:20 AM - edited 10-25-2019 10:20 AM
macbookpro 2015, no I haven't tried on a windows based pc because of license issues. yes slave address is:02
yes they have a proprietary software and with the same cables and adapters I can read and write with the proprietary software(but it is only graphical so I can not see what are the exact commands in terms of hex that I am reading and writing). I am preparing a vi with modbus library which I'll post it soon let you know.
10-25-2019 10:39 AM
You could use another serial port and snoop on the line to see what the commands and responses are.
You could also look for a com port sniffer program.
10-31-2019 05:47 AM
With this VI my rs232 serial communication with Modbus RTU is working, my hex message was wrong apparently... I realized this by hooking up an oscilloscope to rs232 connector and replicating the signals that the proprietary software is sending which made me realize that my prepared hex messages are wrong. below you can find the working VI.