Sign in to follow this  
Followers 0
ammu

CONNECTING PLC with CCLINK J61BT11N through c# visual studio code

7 posts in this topic

hello everyone , 

      I am entirely new to this field. i am trying to connect the PLC with my CCLINk board J61BT11N  through the c# program.  my CCLINK board is my slave and MItshubi PLC is master .  what i have did is , i used visual studio c# windows form application to do datalink connection.  i have only .lib file for using the cclink libray . as i am using c# to develop the form. i created my own class library for C# and used it . i had no errors. but i get the exception " System Access Violation Exception"( this usually indicates that other memory is corrupted or read and write is protected memory). i don't know how to get rid of this exception. i need help urgently.

1.Is it possible to create a c#  windows form program for CCLINK Q80BD -J61BT11N  board  to connect with PLC as a slave ?

 

Edited by ammu

Share this post


Link to post
Share on other sites

I personally can't give you the guidance on how to connect, but I do know that our software programmer does exactly what you are asking with their code.

I do know that you need MX Component installed on the PC, to establish the connection, it can't be done directly through the C# so that might be your missing link. 

Share this post


Link to post
Share on other sites

hi wattup . thank you very much for your reply. yes exactly i did what you said after trying using simply the c# program. i coded with mx component type control like ActUtlType. And so i connected successfully.

1.My another doubt which arose on my yesterday's work is that" if i used MX component can i read only D register from other side of the connected device. What i did was i used the device code "D0" to read the value  but the value displayed is the value of Rwr0 reception register  of the CC-LINK board. I want to read the value of the SD register.

2.is it possible to read the bit register like Rx and Ry through Mxcomponent. help Please!

Share this post


Link to post
Share on other sites

I spoke with my programmer, here is the manual that he used to write our software. 

Basically he uses GetDevice to read data less than 2 words, and ReadDeviceBlock to read greater than 2 words.  

MX Component Programming Manual

Share this post


Link to post
Share on other sites

thank you wattup

you know i too used the same manual of MX component . I used getDevice and Set Device functions to read the word of registers Wr0 of CCLINK. And offcourse  i can read and write  bit and word.  But I can  do  this all read and write operation by MX component functions only when the CC_LINK data status is "In Data Link"  state. I use Open() function to connect with CCLINK card.   Open() and Close () just do the function of connecting and disconnecting with the CCLINK board. But i need some functions from Mx Component  to Open the datalink of the CCLINK Board.

1. My only question is how to open the data link by MX component functions . In my default example program , they used the line " ret=mdOpen(81,-1,Path) "  to start the data link.[mdopen(channel, mode , path)].  Is there any function in MXcomponent  which allows this function ?  But i gone through the entire manual.  I need some serious help regarding this problem.

Share this post


Link to post
Share on other sites

Im checking in my my software guy. 

Share this post


Link to post
Share on other sites

plcModule.ActLogicalStationNumber = {StationNumer you set in MX Component};

    int result = plcModule.open(); //Open the comm port

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0