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,359
Hi I'm very new to PLC programming and I'm trying to find out if this library (Tc2_NcFifoAxes) is necessary for our task In our case we need to...
Replies
0
Views
38
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
83
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
138
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
260
Back
Top Bottom