Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP with Vision Builder is Slow

This discussion is a bit old now... I think VBAI's ModBus server has been rewritten, and the settings are not in the vision builder.ini anymore.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 11 of 33
(1,859 Views)

In VBAI 2013, we moved the Communication device settings to Vision Builder System Config.ini. Now you need to update this INI in the [Devices] section with Server_PrivLoopRate=200 (default). This is not listed by default, so just add this new entry at the end of the [Devices] section.

 

Hope this helps,

Brad

Message 12 of 33
(1,851 Views)

Thanks!  Just to be clear, is the loop rate a global setting, or is it set per server device?  In other words, my existing Modbus TCP section of that file looks like:

 

01_Name = "Vision Builder AI Modbus TCP Server"
01_Protocol = "Modbus TCP"
01_ServerDevice = "TRUE"
01_Modbus TCP_Server_Timeout = "5000"
01_Modbus TCP_Server_ServerEnabled = "TRUE"
01_Modbus TCP_Server_On = "TRUE"

 

Should I append the "01_" to the "Server_PrivLoopRate = 200" entry?

0 Kudos
Message 13 of 33
(1,836 Views)

There can only be one VBAI Modbus TCP Server anyway, so the setting is global.

 

Brad

0 Kudos
Message 14 of 33
(1,828 Views)
I would also like clarity on the syntax - it doesn't appear to be working for me.
0 Kudos
Message 15 of 33
(1,824 Views)

Also, I'm finding that the ini file is overwritten (without the loop rate entry) every time I exit and re-enter the Communication Device Manager.  I think I can work around that, but just wanted to make sure it was known.

 

When I exit VBAI, I can confirm the Modbus TCP server has stopped, and restarting VBAI causes the Modbus TCP server to restart as well.  However, it doesn't cause the Modbus TCP server to use the faster loop rate inidcated in the ini file.

0 Kudos
Message 16 of 33
(1,817 Views)

Here's a snippet of what the "Vision Builder System Config.ini" should look like:

 

[Devices]
#Devices = 1
00_Name = "Vision Builder AI Modbus Serial Server"
00_Protocol = "Modbus Serial"
00_ServerDevice = "TRUE"
00_Modbus Serial_Server_VISAResource = ""
00_Modbus Serial_Server_Mode = "0"
00_Modbus Serial_Server_Timeout = "5000"
00_Modbus Serial_Server_Address = "1"
00_Modbus Serial_Server_ServerEnabled = "TRUE"
00_Modbus Serial_Server_On = "FALSE"

Server_PrivLoopRate= 200

...

 

No quotes around the number for this private entry

Hope this helps,

Brad

0 Kudos
Message 17 of 33
(1,813 Views)

Yeah, that is what I think I'm doing.  I know it is the right ini file because it responds to the TRUE or FALSE settings for whether the server runs at application launch.

 

I'm attaching the file, maybe there is something else that I'm missing.

 

 

0 Kudos
Message 18 of 33
(1,801 Views)

After analyzing the code, this INI key is actually not used.  I took a look at VBAI 2010-2012 and it didn't look like this was used then either. So either I am not reading the code correctly or the person that reported it worked actually got his inspection working by adding the Wait, which was the other comment Christophe had made. We will do further investigation into this. Are you running into the same issue that joshvm00 originally posted about? (i.e. slow response time of the VBAI Modbus TCP Server?) Just want to make sure this is the same issue.

 

 

I will also move the private key location in VBAI 2014 so it doesn't get overwriten everytime you edit the Communication Device Manager...thanks for reporting that.

Thanks,

Brad

0 Kudos
Message 19 of 33
(1,788 Views)

 

Ok, thanks for looking into it.  I don't have the excessive loop times the OP talked about, I just stumbled onto this thread while searching for ideas on a different Modbus question.  I have become accustomed to 200 ms loop times and assumed I had no control over it.  However, that makes the vision inspection system the slowest responding TCP/IP device on my machine, so I got excited thinking I could speed it up.  The other devices run at around 100 ms with much more data being transferred and parsed, so I would probably choose to run this at that speed or faster.

 

 

0 Kudos
Message 20 of 33
(1,786 Views)