Jump to content
Sign in to follow this  
DerekGodown

UniCANnot figure this out

Recommended Posts

Hello all,

I'm currently working on a monitoring system for the water tank in my industrial park. This will consist of multiple analog inputs, for which we are using an EX-RC1 and an ATC8 that we pulled out of an old project weeks before. This is my first ever project on Unilogic, and I didn't even as much as open the software until this project came to me. So I'm learning both CANbus and Unilogic from scratch. And though it is incredibly easy to use, there are quite a few things that differ from Visilogic which is my only experience in ladder logic to begin with. To learn what I needed to, I watched the webinar videos enough times  to basically memorize each presenter's speech patterns. I've gotten decently far by that method as well as example projects/help menu in Visilogic, but now I'm stuck. I know I have plenty of work ahead of me from this point, but I would really like to achieve a communication so I can go from there. 

Our PLC is a Unistream 5 RA28 with a CX module(resistors on both ends). To test the data communication I'm using a Type-K thermocouple(jumpers are set to B.)

My input is recognized on the ATC8, the RUN light is lit, as well as PWR and IO COMM on the RC1, however the BUS COMM light is blinking, from what I understand that means Im having an issue connecting to my PLC, when I check the status, it shows an 8 or a 9, telling me the FIFO is full. I used the example program in the help folders as my outline for this, but wasn't clear on what I did or did not need, so I did my best. I've been tinkering with the code running off of Trial and Error all day so there may be something small I didn't switch back to its original state or match up accordingly. it's been quite the rollercoaster. I attached my code for the visilogic RC1 portion of it, though I'm not certain if my problem lies there or in my Unilogic. As of right now I don't believe I need much of my OUT subroutine logic, its just there for future reference. 

If anybody has the time and understands the fine inner workings of CanBUS and can locate my error(s) I would very much appreciate the help. It's been quite the journey with this project, I've laughed, I've cried, I've cried while laughing, but now I'm ready to stop playing detective and find out how to move on from here.  

WaterPumpMaybe.vlp

Share this post


Link to post
Share on other sites

Understand the UniCAN is a broadcasting protocol.  The broadcast is initiated by the UniCAN Send block.  In your case, the RC1 will do the broadcasting and the UniStream will just sit there and listen.  You'll need to upload your UniStream program for us to be of help, and I don't know if the upload limit will allow that.

I looked at the UniStream example C:\Users\Joe\Downloads\Unitronics\UniLogic_Example_Projects\UniLogic Examples_V1.23 Rev 25\UniStream and EX-RC1\EX-RC1_IO

The Check Alive pulse goes around every 0.5 seconds.  I've had problems with the Unitronics Check Alive timer preset of 1.1 seconds, so I usually set it to 2.1 seconds.

For starters, your RC1 program commented out the UniCAN Send block, and you've spread your MI address out.  I'm assuming you've set the DIP switches so the RC1 is UniCAN ID #2.

I grouped all the inputs registers together and entered them directly into the Send block.

The problem may be in your IO tag definition in the UniStream.  Here is how the example is defined-

image.png.4bf1fa9233b5a911ac44e61fa9385741.png

image.png.d6cd26518615efff62674611f817ba4d.png

image.png.c03ac3e286cc0a29b0887a450b03ec2c.png

Notice that the tag names match what the example RC1.vlp program is sending.  Did you do this?

Joe T.

 

 

  

WaterPumpMaybe JT.vlp

Share this post


Link to post
Share on other sites

Joe, thank you for your response,

11 hours ago, Joe Tauser said:

your RC1 program commented out the UniCAN Send block

^^I'm not clear on what you mean by this, I spread my MI's out because there is likely going to be more inputs/outputs added as I go on, and to better organize it when that happens. My main concern is with getting one MI through right now so I wasn't too concerned yet about numbering them all sequentially. 

The DIP is set to ID 2, yes. Also, the MIs in my Unilogic struct for my RC1 do match up with the MI's I grouped oddly in Visi. Thank you again for your time, I will try out the changes you made. I also saw something about having to export from Unilogic and then importing it back into Visilogic after doing the opposite for the RC1, do you know if this step is always necessary? There a lot of things and steps that I'm not entirely sure the reason of.

Share this post


Link to post
Share on other sites

My only goal right now is to establish a connection and keep the Bus COMM light on. Is it possible to do a simple Hardware Config on both programs with a COM Init and a check alive to see if I'm getting a response?? I've been suspecting the wire today but want to make sure before I chop another one up. Obviously exporting and importing the ulri file and matching baud rates and all that fun stuff as well.

*three hours later*

I had a wrong SB in front of my Send block, fixed it to the right priority and I now face a Status Message of 1, the message is ready to be sent, but the network is currently busy. What are some things that may be making this happen? I feel like my Visilogic is fine and good to go, especially after Joe took a look at it. But followed every step of the Uni Help dozens of times and have found no luck. I redid the cable as well and tried a different ATC8 (didnt expect that to be the cure but at this point plug in whatever to see if it will work)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...