| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 23/02/2012 15:22:39
|
moinmoin
Padawan
Joined: 22/02/2012 15:06:38
Messages: 26
Offline
|
Hello Mango Team,
this is a follow up of my previous post (http://mango.serotoninsoftware.com/forum/posts/list/1062.page).
Under Windows 7, I run the following software versions:
I want to add a Modbus serial data source which is an uDAM ND-6530 USB/serial converter. I installed the driver software for that one from the manufacturer. Now I want to add a data point to this data source, namely an IME Nemo D4-Dc. I configured the device, the os-driver and mango to the same baud, parity, stop bit, timeout etc.
When I try a `Modbus node scan', I get this error in the tomcat console:
com.serotonin.modbus4j.exception.IllegalFunctionException: Function code: 0x7d
at com.serotonin.modbus4j.msg.ModbusResponse.createModbusResponse(ModbusResponse.java:6
at com.serotonin.modbus4j.serial.rtu.RtuMessageResponse.createRtuMessageResponse(RtuMessageResponse.java:37)
at com.serotonin.modbus4j.serial.rtu.RtuMessageParser.parseMessageImpl(RtuMessageParser.java:41)
at com.serotonin.modbus4j.base.BaseMessageParser.parseMessage(BaseMessageParser.java:37)
at com.serotonin.messaging.MessageControl.data(MessageControl.java:181)
at com.serotonin.messaging.InputStreamListener.run(InputStreamListener.java:76)
at java.lang.Thread.run(Unknown Source)
When I try `Modbus read data' I get a red error "No response from slave 209". Slave ID is correct and all. The tomcat log shows the line
tried to access field gnu.io.RXTXPort.IOLocked from class gnu.io.RXTXHack
I found this error posted here
http://mango.serotoninsoftware.com/forum/posts/list/874.page
and here
http://mango.serotoninsoftware.com/forum/posts/list/297.page#1392
but I could not find a connection to my problem. As far as I can see, IO locks up and there is no return. I am no expert in serial bus communication, only getting my feet wet. Can anyone point me in the right direction?
Thanks for reading and Best Regards,
Michael Bach
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 23/02/2012 22:04:47
|
JoelHaggar
Knight
Joined: 31/07/2010 19:35:48
Messages: 265
Location: Boulder, Colorado
Offline
|
Hi Michael,
Have you tried reading the slave with another modbus software like modbus poll? This would help you verify if it's a problem with your adapter or a problem in Mango.
Thanks,
Joel.
|
http://www.InfiniteAutomation.com |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 27/02/2012 09:41:08
|
moinmoin
Padawan
Joined: 22/02/2012 15:06:38
Messages: 26
Offline
|
Hi and thanks for the hint Joel,
I am trying right now with the modpoll tool from here.
My first call was
which returned an illegal data address error (I do not remember exact wording). When I tried to modify the data type on subsequent calls to modpoll.exe, I get the error
Serial port already open!
I also tried with the -1 option to just poll once - same result. Do I have to close the port manually? I could not find any documentation on this and as far as I can see there is no other application using that port. As I said, I read up about modbus but do not have prior experience with it.
Thanks for your help,
Michael
Edit #1: I figured out which application occupied the port. Now I am experimenting with the data types and will report when I run into further issues.
Edit #2: I figured out the correct data type and for the call
I get the error
Illegal Function exception response!
I do not see how I can change the function in modpoll. The device expects a function code 0x03 to read one or more consecutive words (1 word = Bytes).
Edit 3: Since the call
works (reads out the device identifier in this case), I assume now that there is nothing inside the 0x1000 register, since a poll to that reference fails. So now I need to check whether my device is storing the values correctly, right?
This message was edited 3 times. Last update was at 27/02/2012 10:53:45
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 27/02/2012 12:39:50
|
moinmoin
Padawan
Joined: 22/02/2012 15:06:38
Messages: 26
Offline
|
My previous post became too bloated to quickly make sense of it. I leave it here so that it can serve others with similar hardware to approach this issue.
After several hundred command line tries, I ended up with the correct one. For reference:
As a side note, reading the manual DOES help (for the IME NEMO D4-Dc slave in this case).
Also, using these settings I can successfully read that value in the Mango `Point locator test'. However, the Tomcat log still shows the line
tried to access field gnu.io.RXTXPort.IOLocked from class gnu.io.RXTXHack
Now I wonder whether this "error" gets significant in terms of preformance or stability once there are more slaves and data points (each polled every second or so)?
Thanks,
Michael
|
|
|
 |
|
|