Jump to content

Holding the value from Modbus Master Query: software o hardware problem?


Recommended Posts

Hi all, 

 

I'm working on a project with a torque tool that has its own controller, and I have to make a program in Labview to select some stuff, monitor and save data. I'm using the Modbus/TCP protocol, and with the modbus library in Labview so far I've had no problems reading and writing, except for 1 signal:

 

The torque tool can save up to 99 diferent Channel/Jobs (different torque curves), and I need to be able to select them with Labview. What I expect is that I write the register once at the beggining of the program, and then the channel remains selected until the job is done and the user wants to change it to do another job. But the problem is that when I make the writing in the MB Ethernet Master Query (multiple coils), the signal doesn't stay turned ON as I need it. If I debug it, I see that it just stays ON for miliseconds, and right after the Modbus makes the writing it turns OFF.

 

If I put the block  in a while loop, it acts as if it was a continuous signal, but the problem is that when the code starts growing up to include all the other stuff, it adds some delay and it no longer acts as a continuous signal (mostly yes, but it has some shutdown peaks for some miliseconds, which visually doesn't affect too much, but it resets the channel/job and that stops the torque tool, which of course is unacceptable for the application).

 

So my question is: is there anything I can do to solve that programmatically in the labview code? (forcing the " MB Ethernet Master Query (multiple coils)" to stay ON after they are written, or giving high priority to a specific while loop containing only that writing?),  Or do I need to contact the provider of the torque tool and ask them about setting the channel/job selection signal without writing it continuously?

post-51439-0-53596100-1403009931_thumb.p

post-51439-0-39640400-1403009941_thumb.p

post-51439-0-91430600-1403009945_thumb.p

Link to comment

Something is turning the bit off. My recommendation is to look into what is turning the bit off. It could be you're writing a zero to the register incorrectly. It could be the torque tool turns off the bit on its own (I've seen this with drives where external communication is used to set internal bits and both bits are named the same). Are there any "keep alive" signals that need to be sent?

Link to comment

I searched in the manuals and didn't find any "keep alive" or "acknowledge" signals needed to be sent. It's supposed to work simply by writing in the address given.

 

I tried searching what signal could be turning it off, but had no success. I even erased the signals assigned in PIO(in) (16 internal signals assigned in parallel ports), although no one was the JOB selection signal. I tried writing the signal alone, just like in the vi attached (and without the while loop) so I don't think I'm writing a zero in my code. 

 

But thanks for telling me what exactly could be the problem, I'm just starting in all this so I didn't know where to look or if it was a normal behavior.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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