[FEATURE] focusOrder property for mobile 'forms'?

These session custom properties don’t seem to have the “copy” path either, or a way to organize them such as folders for tags. Granted, that may not be the idea behind these…

As you’ve probably seen by now, Session properties can take on any form you’d like, including objects. Here’s how to reference individual variable types and assign them in scripts:

For referencing values (my_value is a “value” which happens to be a String):
self.getSibling('Label').props.text = self.session.custom.my_value

For referencing values in arrays (site_bays is an “array”, and each array element contains a key of ‘item_count’, which is a number):
self.getParent().getChild('LedDisplay').props.value = self.session.custom.site_bays[n].item_count, where n is the zero-based index you’d like to display
(note that self.getParent().getChild(‘X’) works just like self.getSibling(‘X’) )

For referencing objects, it’s a period-based syntax to refer to each child object, just like we’re doing for the session properties in general (site is an object which has an object key of hr_dept, which has an array of employees objects, which each have a key of ‘name’):
self.getSibling('Label').props.text = self.session.custom.site.hr_dept.employees[n].name

If you think of objects as a "folder’ than they are indeed organized as you’d expect.
A MyDir/subDir/filename folder structure is no different from a MyDir object, with a subDir object within it, which then contains a filename value, a la MyDir.subDir.filename.

You are correct though that they do not have the “copy” option, as we discussed previously for other properties.

Is there a way to re-order/move existing custom properties other than delete and re-insert?
so then my path would be session.custom.object.key, correct?

  1. Not that I’m aware of, though I’m not confident that the properties listed there maintain their order - there is an open ticket addressing that very issue.
  2. That path is correct for binding (a script would require self.session.custom.object.key).

Can we get these commands (and others listed in the 8.0 forum) added to the 8.0 user manual so we can reference them again later?

The documentation for the previously-mentioned Perspective script methods is located here.

This includes

getParent()
getChild()
getSibling()

Thanks for elaborating on/expanding what was already in the manual. :grin:

1 Like

For devices like the ones shown here, would the mobile app possibly have support for its barcode scanner? Or would the new components take keyboard input?

These devices often don’t have a traditional camera, and they have their own barcode scanning hardware and software. Generally, the results of a scan can come in as keyboard input with a CRLF attached, or they can come over an API (something like this I’m assuming: https://www.cognex.com/products/barcode-readers/mobile-solutions/cognex-mobile-barcode-sdk )

For that specific device, yes it has it’s own apps to assist with barcode scanning, any other inputs (like CRLF), and symbologies to use. (Dataman quick setup, Scanner, and MX Keyboard wedge in the app/play store.)

As you can see on the Cognex site, it can either be used in a sled that uses the internal cameras, or in connection to the sled (MX-1502 with ER lensing shown) that will allow a more traditional “scan gun” user experience, and the device connection method shown on the Cognex site (Adaptable as per device).
I was able to get it to run/scan with the old mobile module with a few hiccups. But the database interface was on the gateway, and I tried to keep the client as thin as possible.

I know that it can use either iOS devices or Android (Which I thought was perfect for Ignition usage). I am using an iPod Touch 6th gen running iOS 12.1.

I also have not explored the Cognex SDK much …yet… as the Ignition mobile module was somewhat functional and hoping that the Perspective module will completely replace it. My understanding is though that if we needed a more native interface, yes the Cognex SDK would be the way to go.

Has the new barcode scanner component you were talking about 2 weeks ago already been released with one of the nightly builds or is it still in the works?

Cognex does have a keyboard wedge that shows up when I click in a text field (Called MX Keyboard in the app store). The scanning sled also allows me to input to that text field.

The barcode scanning component was added in the last nightly. It’s still pretty experimental at this point, so let me know if you have any questions or feedback. Thanks!

Has the documentation been updated with the proper calls for these functions yet? If not, can you please share how we can access them?

Sorry for the delayed response. I never could get focus to work correctly on an iOS device. (It was later confirmed that Apple blocks this, makes the users “click” on the fields.)

However… I just loaded it up on a CK65 from Honeywell, android OS and it ran perfectly… including with a CR as the scan suffix to nav to the next view “on key press” (success!)