Code for using the serial ports of PAC-S2

Hi Rudy,

Be sure to check out this 101 post which includes links to some serial examples at the bottom.

However, you mention getting the ports configure by PAC Manager, which is lovely, but you might consider adding code to do the same in your strategy, so that all of your settings/logic are in one place, and if later you want to move this strategy to another PAC-S2 it’ll be 1 step, all self-contained. We have PAC Control commands to write to those memory map addresses, e.g. “Write Number to I/O Unit Memory Map” (where, in this case, you’d create an I/O Unit of type “Generic OptoMMP Device” w/ the loopback address of: 127.0.0.1 and write the values to that).

Also, you mentioned PPP (I’m assuming you mean for that “Control Function…” setting) but I doubt that’s what you meant, most likely, for the application you have, you want “None” instead. You have your S2 wired directly to that serial 485 link, yes?

Thanks,
OptoMary