Cats Whisker
Hi
I tried to update to latest but the update got stuck and openplc would not then reopen. So I’ve downloaded latest 2024-10-16 uninstalled original and reinstalled (Win 11).
unfortunately this hasn’t solved my two problems:
  1. I understood that Arduino should appear as default plc but it’s not the case. I still have the red circle with orange centre. How might I rectify that please?
  2. The screen shot will show I’m trying to use the analog inputs as digital but when I click ‘transfer to plc’ I don’t get the opportunity to modify the pins, the compiler just bails out. Should I not use %IW0-4 as digital at all? Or is there a solution?
Expanding on 2 above: do I understand I don’t get the chance to modify the pins until the program has fully compiled?
 
i very much appreciate your time. Thank you
Jon
Reply 0 0
thiagoralves
  1. This assumption is incorrect. The Arduino icon only existed in very old versions of the editor.
  2. IW are analog locations by definition. You cannot associate a BOOL variable with a 16-bit analog location. If you need to change pins, you need to do that on the upload dialog, at the IO Config button, after clicking on the orange circuit icon. This will allow you to map analog pins (A0, A1, etc) to digital locations, essentially making them available at either %IX or %QX depending on where you mapped them
Reply 0 0
thiagoralves
As for the update, you normally need to have an unfiltered internet connection to be able to download the update. Make sure your internet connection allows you to git clone a repository from GitHub. If you can’t do that, then the update won’t work.
Reply 0 0
Cats Whisker
Thank you Thiago. I have done some web searching to follow up you reply but I still need some guidance, apologies.
If I wrote BOOL at location %IX1.0 then could I put 14 in the analogue line on the pin mapping and so on 1.1 - 15 etc. is that the correct way to do this?
Reply 0 0
thiagoralves
The pin mapping is a list of pins, where addresses are mapped in sequence. For example, the first pin listed in the digital input line is mapped to %IX0.0. The second pin is mapped to %IX0.1, the third to %IX0.2, and so on... So if your digital input line reads like this:
2, 3, 4
It means that pin 2 on your Arduino board is mapped to %IX0.0, pin 3 is mapped to %IX0.1, and pin 4 is mapped to %IX0.2. You can add any pin to that list, given that you haven't added it to any other list (i.e. you can't have pin 13 listed in the digital outputs list and on the analog output list).
Reply 0 0
Cats Whisker
I’m really sorry but I’m not explaining myself well enough. I understand what you have said, and indeed used the mapping successfully for small projects.
Looking at the R3 data sheets I understand I can use the analogue pins as D14-19: can I map them to %IX1.0, 1.1 etc if I want to use them for my digital inputs? (I’m using D2-13 for outputs).
Reply 0 0
thiagoralves
Yes
Reply 0 0
Cats Whisker
I eventually got where I needed to be! Thank you so much for your time and patience, it was greatly appreciated. Initially I wasn’t even sure of the question to ask and it was only by our back and forth and some web research that the mist cleared.
Reply 1 0
Reply