# Reading and Writing to the EEPROM card thru Keithley module

**URL:** <https://forum.inductiveautomation.com/t/reading-and-writing-to-the-eeprom-card-thru-keithley-module/12765>\
**Category:** Ignition\
**Created:** [March 9, 2017, 12:24am UTC](https://forum.inductiveautomation.com/t/reading-and-writing-to-the-eeprom-card-thru-keithley-module/12765 "2017-03-09T00:24:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bokechal](https://avatars.discourse-cdn.com/v4/letter/b/6f9a4e/32.png) [@bokechal](https://forum.inductiveautomation.com/u/bokechal)\
**Post date:** [March 9, 2017, 12:24am UTC](https://forum.inductiveautomation.com/t/reading-and-writing-to-the-eeprom-card-thru-keithley-module/12765/1 "2017-03-09T00:24:25Z")

</div>

Hello,  
We have probecard with EEPROM memory that we are reading from and writing value to.  
The vendor supplies DLL allowing to read/write value to the memory.

The software engineer is able to write C# application as well as JavaScript and simple webpage to do the reading/writing.

For the webpage(JavaScript), it’s just a simple form with fields. User enters values and click button to write data to the memory.

Our department develops Ignition application for other purposes but there is a new request to integrate read/write functionality to our Ignition application.

I’m seeking an easier route by trying to use web browser module. I was thinking that whatever it’s running in the web page, should be fine with the web browser component; unfortunately, it’s not.  
Looking into the Javascript and I found that the ActiveXObject is being used which I believe that it’s not supported anymore.

After extensive searching in forum, I know that ctype is limited in Jython.  
Native Java might be another alternative but I’m not certain.

Anyone has any suggestion what should I do?

Gateway 7.8.4  
Java 8\_91  
Web Browser module 2.8.2 (b2016030813)

[quote]Message from click Read button through Web Browser component  
04:14:50 INFO: READ: OnRunJavaScriptDialogMessage{type=OnRunJavaScriptDialog, uid=149, dialogId=1, originURL=‘[http://chimpv2s107/](http://chimpv2s107/)’, acceptLang=’’, messageType=0, messageText=‘undefined’, defaultPromptText=’’, isReload=false}, SocketInfo{channelId=0, browserId=0, channelType=Browser}[/quote]

[code]JavaScript  
function readPcEEPROM ( )  
{  
try  
{  
// Allocate and initialize  
var dio = new ActiveXObject(“Kdio.KeithleyDio”);  
var ll = new ActiveXObject(“LowLevel.Feature”);  
var mb = new ActiveXObject(“Motherboard.Motherboard”);  
ll.SetDigitalInterface(“KPCI3160 0 0”, dio);  
mb.Interface = ll;

```
// create output object
var argsOut = new Object();

code = mb.ReadProbecardEEPROM(argsOut);			
if ( code )
throw new Error ( code, "Failed Reading Probecard EEPROM" );

pcType.value = argsOut.ProbeCardType;
pcTypeRevision.value = argsOut.ProbeCardRevision;
pcMfg.value = argsOut.ProbeCardManufacturer;
pcSN.value = argsOut.ProbeCardSerialNumber;
pcDeploymentTS.value = argsOut.ProbeCardDeploymentTS;
pcEditorUserID.value = argsOut.EditorUserID;
pcSpareField.value = argsOut.SpareField;
pcComment.value = argsOut.Comment;	
}
catch (e)
{
  alert(e.description);
}

```

}[/code]

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a24db3b97a505fb04cf1921a5ab502a14abfb83e.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 9, 2017, 2:17am UTC](https://forum.inductiveautomation.com/t/reading-and-writing-to-the-eeprom-card-thru-keithley-module/12765/2 "2017-03-09T02:17:16Z")

</div>

Not only can you not use ActiveX technologies within Java, you can’t call DLLs from Jython. You would have to write/acquire a “JNI” bridge from Java to this product’s DLLs, and wrap that JNI and its associated Java classes in an Ignition third-party module.
