Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Update tolerances in VBAI in real time via ActiveX?

Without seeing your inspection, I can only give you general thoughts:
The list of measurements available in the Logic Calculators will only list the registers that you previously read from a Modbus step in the same state. If you moved the Logic Calculator to a different state than the Modbus step, none of the Measurements will be found. If this is the case, you should get an dialog when you open the Logic Calculator step.
I would be curious to see your inspection, because there is no reason why the Modbus step wouldn't log its results, unless it was configured to run only at the first iteration (make sure the checkbox is not enabled on the step UI). The Read of Mobus registers never returns errors.
 
VBAI will handle about 5 queries per second if you don't change the default period of the server loop.
As for your master, it is specified in the Modbus specs that the quantities of registers to read must be between 1 and 125
and the quantities of registers to write must be between 1 and 121.
 
Hope this helps.
 
Christophe.
0 Kudos
Message 31 of 44
(2,088 Views)
Can I email it to you?  I'd rather not post it here to the public.  I know the run once box is not checked. 

Message Edited by scott_7723 on 04-08-2008 10:39 AM
0 Kudos
Message 32 of 44
(2,085 Views)
Sure. If that's OK with you, I'll ask IT for your email info so we can handle this tech support issue by email.
 
0 Kudos
Message 33 of 44
(2,080 Views)
Yes, that is ok with me for you to ask IT for this info.  Thanks.
0 Kudos
Message 34 of 44
(2,079 Views)
For anyone that may be following this thread (which is not likely): it appears that if you are using VBAI 3.0.1 and make a (read) Modbus Slave step, then make a logic calculation step with those address reads, then go back and remove any reads from within that step, and remove the linked operand boolean steps from your logic calculations, you will need to go through each boolean step and re-assign all operand 2 steps from the modbus to the specified object or feature that were at that point or greater (address value), otherwise it may change operand 2 assignments on you.  In addition, if you have a read Modbus step then use a logic calculator, then remove some of those operands from within the Logic Calculation, you will also need to remove any address reads from the Read Modbus step that is not being used, otherwise a Measurement Not Available occurs. 
0 Kudos
Message 35 of 44
(2,048 Views)

One little question?

What about the original and very old theme of this post, update tolerances trough ActiveX?

I'm using VBAI 2009 SP1 and Visual Basic 6 (right, in 2010).

I try to change LowerLimit and UpperLimit properties value, but they never apply. Every time I do a Inspection.RefreshLimits the limits return to original values.

Now I'm using a ini file as a middle solution for user updated tolerances.

0 Kudos
Message 36 of 44
(1,555 Views)

The ActiveX only allow you to retrieve the limits, not set them. to have the user modify limits, the recommended way is to not use the step limits, but instead add your own decision making step (logic calculator or calculator step), and compute the pass/fail condition based on the results you're interested in and limits that you read from Modbus registers. Use Modbus commands from your application to set these Modbus registers.

A less optimal way is to read those limits at each iteration from a file that you write from your application.

 

Updating the limits programmatically is a common request, and is on our list of potential future features.

 

-Christophe

0 Kudos
Message 37 of 44
(1,547 Views)

Ok, many thanks. There is any documentation about the ActiveX methods and properties?

 

I suppose that another very popular feature request for the ActiveX control should be reading and writing inspection and system variables, without the need of the Measurement Studio.

 

0 Kudos
Message 38 of 44
(1,531 Views)

CVI and Measurement studio provide APIs for accessing shared variables.

On Windows, we also provide an ActiveX interface to the DataSocket library. If you have DataSocket installed on a PC, through the LabVIEW runtime or some other means, you can write a C++ or .NET app to access shared variables through that interface.

However, this is not well supported outside of the Measurement Studio environment.

0 Kudos
Message 39 of 44
(1,529 Views)

That's interesting!

Do you have any example of the DataSocket ActiveX interface (for .net, c++ or labview)?

Thank you.

0 Kudos
Message 40 of 44
(1,501 Views)