Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Update tolerances in VBAI in real time via ActiveX?

Yes, you have to run it once at the beginning of the inspection (that's why I suggested to call it first in the Setup state) with function code = 1 to initialize the values of your limits, as many times as you want in your inspection, with function code = 0 to modify the limits, then one last time at the end of the inspection (cleanup state), with function code 2 to save the values to the ini file.

 

0 Kudos
Message 21 of 44
(2,094 Views)
As you likely already knew, it takes atleast 50ms to run each VI (even after trying to make the code I sent you considerably more lean--since half the stuff in there was useless) versus using the Modbus Slave technique (averaging < 2ms + 2ms Decision Making) --- according to the benchmark anyhow.  This means the modbus is without a doubt the most efficient method.  Sorry for bothering you so much, but thank you. 
0 Kudos
Message 22 of 44
(2,083 Views)
Does each CVS contain the 4 registers (Holding, Input, Discrete and Coil) used for Modbus Slave, or is it the host computer running LV/VBAI?  I got parts running on cvs 1, 2 and 3.  Each one has a step called Find Main Pattern.  If when connected to CVS 1, I assign the score of this pattern to be written to input reg 1,  will that score show up at the same address when I am connected to CVS 2 or are they totally independant and stored in each CVS itself?
0 Kudos
Message 23 of 44
(2,059 Views)
> Does each CVS contain the 4 registers (Holding, Input, Discrete and Coil) used for Modbus Slave, or is it the host computer running LV/VBAI?
 
Yes, the CVS contain those registers. (More accurately, the VBAI execution engine running on the CVS creates those registers when it starts).
They totally independant and stored in each CVS itself.
Since the registers "belong" to a CVS, a registers locates at the same address on a different CVS will contain whatever data you set using the Modbus Slave step on that specific CVS. To read the registers on all CVSes, you need to open multiple TCP connections (with the IP address of the CVS you want to read/write registers) to all the CVSes.
Does that make sense?
 
-Christophe
0 Kudos
Message 24 of 44
(2,055 Views)
Absolutely.  I was hoping it worked this way.  Thank you.
0 Kudos
Message 25 of 44
(2,055 Views)
Every time I shut down VBAI the tables clear when running VBAI on my PC.  Will this occur with the CVS units as well -- everytime they are shut down?  Man, I was counting on these values being stored in it's non-volatile memory until I change it (atleast the Holding Register values).  Am I out of luck?  Or am I overlooking something within Communication Device Manager setup that would prevent this from occuring?
0 Kudos
Message 26 of 44
(2,040 Views)
Yes, the modbus registers are stored in RAM. They will be reset if you power cycle the CVS.
If you want the values to persist, you need to save them in a configuration file and set them using the Modbus Slave step again.
Sorry...
 
-Christophe
0 Kudos
Message 27 of 44
(2,039 Views)
I keep getting a measurement not found error on my logic calculator steps that deal exclusively with the modbus tables, but when I open the vbai logic calculator steps that are saying this error, it is all ok.  What gives?  For example, I have a logic calculator decision 1 consisting of an ANDing of multiple VBAI steps status' looking to all be true, ORed with logic calculator decision 2 that consists of modbus min max tolerances, then an overall decision that has VBAI Logic Calc ORed with Modbus Logic Calc, but keep getting the Overall Logic decision failing cause the Modbus Logic has measurements not read, even though they are in the Holding register table and VBAI logic step passes.  But when I click on the Decision Making of Modbus Logic Calc (that says measurement not found) it takes a sec then all passes, just not when it is running.  I thought even though the VBAI steps Decision passed, the overall would pass regardless of measurements not being found in the Modbus Decision.  How can I pass the inspection If the measurements aren't found or read, but VBAI Logic passes.  There seems to be no way around this.
0 Kudos
Message 28 of 44
(1,970 Views)
correction: "measurement not available" message under each logic step using modbus slave holding register values
0 Kudos
Message 29 of 44
(1,965 Views)
How many read/writes can be done in a single query?  You mentioned the VBAI allows for 5 queries a second, and I thought I read or heard from you or elsewhere that you can have no more than 100 read/writes within a query.  What is the limit?  Is this why I would get this error message--Measurement Not Available?  Right now, I have between 50 - 99 read/writes within a single Modbus Slave step, is this too much?  I thought with Modbus TCP/IP, "up to 4000 I/O bases could be scanned per second, each I/O base having up to 16 12-bit analog I/O or 32 discrete I/O; 360000 registers per second".  Even though it is device/bandwidth dependant, how can reading and writing to the CVS' memory where the 4 registers reside without even running the master LV program not make enough time to complete?  For the record, I have a program at boot up of the CVS that writes constants to the specific Holding register places that are then called in VBAI steps later.  The other thing you could question is whether or not the value is actually available...like I tried to say earlier, the vbai steps are completed and present (ie. a Pattern score is attained in Pattern Match and the score is to be written into an Input Register--but says it isn't available when slave modbus logic step is completed, unless I double click on the Modbus slave step, then all checks out properly after a second).  I rechecked the addresses and types, all is good.  My only other option I can think of right now is to write a run vi step that can handle this error message differently.  I just assume I'm asking for too much in one step.  I don't know, appreciate you're help, or anyone elses'.
0 Kudos
Message 30 of 44
(1,949 Views)