Trouble with Modbus slave/Master in BCS Tools/iX developer

DCollis

Member
Join Date
Jan 2023
Location
Canada
Posts
9
Hello,

I am quite new to PLC programming. The master would be a Beijier HMI (iX T12B SC) and the slave a Beijier Nexto (XP340). I have successfully connected the two to my laptop via a westermo switch. I can ping and download programs to both. However I have been unable to actually get the iX graphics to do what I've programmed in BCS tools. For example, when I press a switch to try and turn on a bulb, instead an analog graphic will display a number (either 1 or 256). Or if I enter a number into an analog input, one of the lightbulbs will turn on. If anyone has any ideas it would be much appreciated!!
 
I think it's pretty obvious that these are the wrong registers i.e. you have them mixed up, if you are pressing a button & get 256 or 1 then that is bit 8 or bit 0 of the analog word
Same with the other word which should be bits you are putting in a number which for example 11 would be bits 3,1,0.
Modbus you sometimes have to reverse the bytes but if you are using words it would only give wrong numbers/bits not completely swap them around.
 
Thank you for your response, I believe I jumped in too fast and tried to do everything at once. I have reverted to simply trying to flip one switch to turn on one lightbulb as well as delving deeper into Modbus basics and how it works. As of now I am still running into issues. Everything seems right but I'm unfamiliar with these programs so it's hard to say.

SwitchLight.jpg
 
Modbus has been around for a long time but there have been many tweaks, some equipment that has Modbus as a protocol have done dfferent things, byte reversal is common for example If you send "ABCD" then some other equipment will see "BADC" another one is address offset of 0 or 1, so again an example is 4000 can be seen as 4001 I do not use it if I can help it but so many itelligent equipment suppliers support it.
 
Fair enough that makes sense, I'll look further into byte swapping for sure! When I flip my switches/enter values into the analog inputs in iX, none of the changes show in my ladder logic in BCS tools that is in run. SO I'm thinking that while there is no controller comm error, all the communication is somehow occurring in iX only and not with my PLC at all. I'll keep at it!
 
I have not used the Modicon Driver.
I have used the Nexto with an X2, I used the CodesysDriver with Codesys Arti Protocol to communicate using OPC UA.
In BCS Tools you have to add a Symbol Configuration to the Project and then do a Build in Symbol Configuration then select the tags that need to Communicate with. Under the Symbol Configuration Settings select "Select OPC UA Features". Then Download to PLC
In IX under the Codesys Arti Driver and Stations Tab you put the IP of your PLC.

Codesys Atri 1.jpg Codesys Arti.jpg Codesys Symbol Config OPC UA Support.jpg
 
Thank you so much! I did see that video, when I was reading through the manuals for Nexto Xpress I did happen upon a couple things mentioning the Codesys Article protocol. I assumed for this specific scenario I would be required to use the Modicon function in iX. I will attempt to do that as you stated. I appreciate the input! I was wondering if In BCS tools, you had to put the HMI IP anywhere? As the controller is the slave (server) it might not be required as the HMI reaches out to it.
 
Forget Modbus. Add an Arti driver to the hmi and give itt the IP of the Xpress .
Bcs tools can export it published symbols (build->generate code) then import that xml into your ix-dev project.
 
Thanks, I was able to get the ARTI working pretty well. I appreciate the advice! I was tasked to attempt figuring out the Modicon way. I have made progress but am struggling a bit with Read coil status addressing. There is full communication and flipping switched in iX shows up in my BCS run. I just cant seem to get the right lights to turn on. Switch 1 - light 5, switch 2 - light 4, etc... I've attatched screenshots. iX settings are Ethernet TCP/IP, little-endian, Decimal addressing, 1-based start address, Byte swap disabled.

Screenshot (9).jpg Screenshot (11).jpg
 

Similar Topics

I'm trying to use a DirectLogic 05 as a Modbus RTU slave and control it over RS-232 using a .Net Program. I am using the nmodbus4 library. The...
Replies
5
Views
3,721
I am unable to establish communication of GOT with atlas copco controller. Controller supports JBUS protocol and GOT has Modbus. GOT is...
Replies
0
Views
3,559
After the new very nice update to this site I could not log in with my original password, tried to recover my account but did not recieve a email...
Replies
14
Views
363
Hi everyone. I have an issue with an Allen Bradley PLC model 1769-L30ER. This PLC had a previous program with a different IP address but when I...
Replies
4
Views
492
Hello, We are having trouble setting up a generic ethernet module for a Yaskawa GA80U4168 drive in RSLogix 5000 Version 20.01. All of the...
Replies
1
Views
534
Back
Top Bottom