# Calling Cognex Camera LoadJob Method

**URL:** <https://forum.inductiveautomation.com/t/calling-cognex-camera-loadjob-method/69302>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [February 1, 2023, 7:01pm UTC](https://forum.inductiveautomation.com/t/calling-cognex-camera-loadjob-method/69302 "2023-02-01T19:01:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Travis.Dreier](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@Travis.Dreier](https://forum.inductiveautomation.com/u/Travis.Dreier)\
**Post date:** [February 1, 2023, 7:01pm UTC](https://forum.inductiveautomation.com/t/calling-cognex-camera-loadjob-method/69302/1 "2023-02-01T19:01:26Z")

</div>

I need call a load a job method on a cognex camera OPCUA server that ignition is a client of to load a job named Final.Jobx

I am trying to use the system.opcua.callMethod() to load a job on a Camera.

Cognex documentation and screen shot from an example using a different opcua client below.  
It is not clear on what the object id or method id are how would I find this.

Thanks

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/6/56ea968d5fac3f41032887108aac30fb2ce081b9.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/4/2462e9715dae1901bedb4e2641e9c6e0d3cf3ddd.jpeg)

---

<div class="post-metadata">

**Author:** ![kyler.kamyszek](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kyler.kamyszek](https://forum.inductiveautomation.com/u/kyler.kamyszek)\
**Post date:** [February 2, 2023, 7:15pm UTC](https://forum.inductiveautomation.com/t/calling-cognex-camera-loadjob-method/69302/2 "2023-02-02T19:15:57Z")

</div>

I haven't done this specifically, but here's what I would look for...

You should be able to browse the OPC UA Server on the camera once you add the server to ignition using the OPC Quick Client in the Ignition Config. You should see 'Method' in the table.

You also might be able to pull in the OPC into the tags and grab the shortcut from there.

```auto
system.opcua.callMethod(
        "Your Congex Server",
        "ns=0;s=12341", #camera number or group that the camera is in
        "ns=0;i=LoadJob", #might be an integer instead of 'LoadJob' look at the OPC client
        ['fileName.job']

```

---

<div class="post-metadata">

**Author:** ![Travis.Dreier](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@Travis.Dreier](https://forum.inductiveautomation.com/u/Travis.Dreier)\
**Post date:** [February 3, 2023, 4:41pm UTC](https://forum.inductiveautomation.com/t/calling-cognex-camera-loadjob-method/69302/3 "2023-02-03T16:41:47Z")

</div>

@kyler.kamyszek  
Thank you for your reply. The confusing part is that the camera is the the server so not sure what the object node ID means in this case.

Below is what what can be seen when browsing in OPCUA server  
Looks like all methods are showing as folders and have an OPC tag to read the InputArguments.

Don't really unders

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/c/dc05bad2a21fa5f7e7b935394d3b5e81daea8057.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 3, 2023, 4:42pm UTC](https://forum.inductiveautomation.com/t/calling-cognex-camera-loadjob-method/69302/4 "2023-02-03T16:42:39Z")

</div>

If you don't have the NodeIds via some kind of documentation the easiest way to figure it out, unfortunately, is to connect to the server using UaExpert and go find the method, then make note of its parent Object's NodeId as well.

---

<div class="post-metadata">

**Author:** ![Travis.Dreier](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@Travis.Dreier](https://forum.inductiveautomation.com/u/Travis.Dreier)\
**Post date:** [February 3, 2023, 7:11pm UTC](https://forum.inductiveautomation.com/t/calling-cognex-camera-loadjob-method/69302/5 "2023-02-03T19:11:33Z")

</div>

UaExpert was helpful thank you @Kevin.Herron

To load a job on an insight camera the following works.

system.opcua.callMethod("OPC UA server name","ns=2;s=System","ns=2;s=LoadJob", ['NameOfJob.jobx'] )
