task Posted February 2, 2008 Report Share Posted February 2, 2008 Hi, I'm a long time labview user but new to using a PXI controller and RT module. Here's my dilemma... The PXI (PXI-8184) will be connected to a Automation Direct CMore touchpanel via modbus ethernet. No host PC will be present in the end. I have the PC and the CMore talking via modbus (CMore is the master, PC is the slave). All this works fine. Now I'm trying to write the actual RT code that will eventually run on the PXI controller. My problem is getting the modbus stuff to work. All the IP addresses and subnet masks are set up correctly. Under my PXI system I set up a ModbusSlave I/O server. It took awhile but I figured out how to set up the shared variables. I tried several different methods but it still doesn't work. Example: Variable 00001, bind to source ModbusSlave0001, boolean, network published. Is this the direction I should be going or am I off base? I get a deployment error: Cycle detected (addresses of the boolean). I just need a nudge in the right direction! Thanks for any help. Quote Link to comment
ned Posted February 2, 2008 Report Share Posted February 2, 2008 QUOTE(task @ Feb 1 2008, 03:45 PM) My problem is getting the modbus stuff to work. All the IP addresses and subnet masks are set up correctly. Under my PXI system I set up a ModbusSlave I/O server. It took awhile but I figured out how to set up the shared variables. I tried several different methods but it still doesn't work.Example: Variable 00001, bind to source ModbusSlave0001, boolean, network published. Is this the direction I should be going or am I off base? I get a deployment error: Cycle detected (addresses of the boolean). I just need a nudge in the right direction! Thanks for any help. This sounds right to me, but maybe your Modbus addresses are off. You'll have to look at the Modbus spec, but some addresses are for booleans and some are for numbers, and of those, half are for values the master can write and half are for values the slave can write. Are you assigning an address to your shared variable that only the master can write, and then trying to write to it on the slave? I don't know what else that error might mean. Quote Link to comment
task Posted February 2, 2008 Author Report Share Posted February 2, 2008 QUOTE(ned @ Feb 1 2008, 04:05 PM) This sounds right to me, but maybe your Modbus addresses are off. You'll have to look at the Modbus spec, but some addresses are for booleans and some are for numbers, and of those, half are for values the master can write and half are for values the slave can write. Are you assigning an address to your shared variable that only the master can write, and then trying to write to it on the slave? I don't know what else that error might mean. The addresses are correct and I'm using them the correct way...everything worked fine when I was running the program under My Computer and not the Real Time Controller. I guess this is part of the learning curve on how to use the RT stuff. I moved the modbus stuff into the variables-network-RT(separate).lvlib and the "cycle error" went away but I am still unable to read/write anything. I'm doing what I think is logical and I'm probably missing something huge! I'll keep plugging away... Quote Link to comment
David Wisti Posted February 2, 2008 Report Share Posted February 2, 2008 Is the Modbus I/O Server driver installed? Quote Link to comment
task Posted February 2, 2008 Author Report Share Posted February 2, 2008 QUOTE(David Wisti @ Feb 1 2008, 04:41 PM) Is the Modbus I/O Server driver installed? http://lavag.org/old_files/monthly_02_2008/post-319-1201902025.jpg' target="_blank"> Resolved...I had to change the address of the "PLC" in the CMore. It was set to the PC and not the PXI. I put the ModbusSlave under the variables in the RT area (as I mentioned earlier). Now the PXI and CMore are communicating. Now I just have to adapt all the code I previously wrote under the PC for the RT system. Thanks for all the input. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.