Using MX Component with VB.net

khalid rafiq

Member
Join Date
Sep 2006
Location
Faisalabad
Posts
24
hi,
i have developed application for MITSUBISHI A2N CPU using MXcomponent with VB6. the application is working OK. But when i try to develop the same using VB.net it is not successful. when try to perform ReadDeviceRandom method the system generates a error "NullReferance exception was not handelled" any one have idea what to do...........

Thanks
Khalid Rafiq
 
there are a number of differences between .net & vb, variables are not handled the same it is probable that the mx component needs to be updated to work with .net or some kind of interface written.
Perhaps there are more experienced persons here on .net than me who might have the answer.
 
didn't use it in long time and everything so far was done in VB6. i agree with parky about differences (but there should be no reason that this should not work with .NET). check carefully parameters and specially size of each, for example integers in .NET are twice the size of integers in VB6 etc.
 
MX Component with VB.net

I have tried but resulting a null exception error. In .net it successfully checks the connection to the PLC. But when i try to read device block it throws "Nullreferance Exception not handelled". Any one have idea how to resolve this error.
 
MX Component with .net

Thanks "panic mode" and "parky" for your suggessions i have checked parameters of method read device random.
lRet = object.ReadDeviceRandom(szDeviceList, lSize,lData(0))
Documentation provided by MItsubishi says lSize and lData() should be of long type. i have changed these two to integer types and the result is OK. Its working in .net.

thanks again.
Khalid rafiq
 
Need urgent Help!!!!!!!!!!

sir i need to integrate Mitsubishi fx2n plx with my .net code...plzz help ker den ke kaise hogi...mx component is not free from Mitsubishi..my email address is "[email protected]"..thanks in advance....:confused::confused:o_O:unsure::(šŸ™ƒo_O
 

Similar Topics

Can someone explain if there is a way to scale with an offset using the C400 component? (2711C-T4T) In the regular Panelview Standard the...
Replies
4
Views
4,349
I have a project to automate four generator sets. The system will monitor and store the load demand of the factory. Once there's Power outage, the...
Replies
0
Views
49
Adding ethernet equipment to an existing panel that has none. We have some solid ethernet cables coming from other remote cabinets that I plan to...
Replies
3
Views
111
I'm trying to control a device via MODBUS RTU and the ModbusRtuMasterV2_PcCOM in Twincat 3. I've configured a device with the right com port and...
Replies
7
Views
219
Hi, I'm trying to use the IO Device Library (Product Versions) which is configured to work with the 1756-EN4TR & 1756-EN2TR but my system uses...
Replies
0
Views
56
Back
Top Bottom