12-15-2014 09:47 AM
Feature suggestion. I fixed the orginal issue I posted about (sorry for long delay) it was a deeply underlying OS issue.
The feature suggestion I had is on the slave server I'm assuming internally there is a semaphore managed constant data thought a Pre-allocated clone reentrant execution VI (or this is how I've seen modbus slaves done in the past).
That being said. Is there a ways where I can control this semaphore for opperations where I want a thread to force exclusivity to a the data model for several opperations, as currently if I make 3 calls within a thread, I should allocate, release, allocate, release, allocate release. And the state I'm modifying may change between my operations.
I think that makes sense. I haven't finished my coffeee yet.
12-15-2014 10:11 AM
Glad to hear its working.
I think I understand. The slave uses 4x DVRs to maintain a lock on the data (DVRs basically include semaphores). However because the semaphore + data access is integrated in this, there is no way to make a single request span multiple VI calls. That is, there is no way to replace "read reg 1", "read reg 2" with "lock", "read reg 1 + 2", "unlock". The only solution would be to get access to those DVRs directly at which point you could directly manipulate the dataset yourself, without using the APIs to do so.
I've been thinking about doing this off and on (for a different reason) so it may be something I get around to adding in the next few weeks if I find some time.
01-16-2015 11:52 AM
Currently using version 1.1.4.33 (is that the most recent?).
On a serial holding registers read I get an Error 56, LabVIEW: The network operation exceeded the user-specified or system time limit.
Should I get this for a serial read? Is it a general timeout error?
01-16-2015 12:06 PM
the visa errors are weird and not very familiar so any timeout gets converted to 56.
the current version is 1.1.5, which is linked from the top of the download page.
01-16-2015 12:28 PM
Upgraded to 1.1.5.39 error still remains.
Also why don't you just return the visa error unchanged?
01-16-2015 12:32 PM
Also this is at least the 4th major project haulting error I've had with this library.
01-16-2015 02:22 PM
The visa error isn't really meaningful most of the time because of the way modbus serial works. Basically there is always a timeout even if there isn't a timeout.
On the last page you had this same error with the newer version of the library. Now on this page you are back to an older version of the library and encountering the timeout again.
Questions:
Is this the same project? Different? What is the hardware? When do you recieve the timeout--is it immediate, or only occasional? Where does the timeout occur, on the master or slave? What is the master, what is the slave? If you retry after you get the timeout, what happens? Have you tried setting a longer timeout?
01-16-2015 02:28 PM
I'm simply writing a new modbus RTU master library.
Not being able to dive into the source and quickly solve these problems has become unacceptable for my needs.
01-16-2015 03:07 PM
OK. If you just need the master I'd start with this: http://www.ni.com/example/29756/en/
01-22-2015 02:03 PM
Hi,
A couple of questions:
Thanks,
Steve.