11-07-2024 04:31 PM
Sorry to hear you are struggling.
First I just want to mention that at least in the past lv on raspberry pi was only permitted to be used for noncommercial usage.
Now to the problem you have. The link you provided to turn it into a master slave is most likely not applicable to raspberry pi. This is a feature of cRIO targets from NI.
What you could try is to use the modbus toolkit and build the necessary server code you need on the host. However it seems someone has tried this with a RS485 HAT in the past and not succeeded. See this https://forums.ni.com/t5/Hobbyist-Toolkit/VISA-resource-name-on-Raspberry-Pi/td-p/4221252
modbus lib on vipm: link https://www.vipm.io/package/ni_lib_modbus_library/
When it comes to your pico code it will not be able to run in LV-environment on raspberry pi. That is for use with python what it looks like and you would want to use a different os install that supports you modbus server code in python.
11-07-2024 04:36 PM - edited 11-07-2024 04:39 PM
Delete double post.
11-07-2024 04:46 PM
Thank you JonasM,
I am reading this article and hopefully it will help Connect LabVIEW to Any PLC With Modbus - NI
Thanks again!
11-07-2024 06:18 PM
That way works well on windows and ni rt targets. I'm very unsure if it works on raspberry pi. I think your best bet is the toolkit I linked in previous post. You would have to code the server side on the main vi of the raspberry pi. There are examples how to use that toolkit. I've seen many posts on the forum about. Can't find them now on my phone though..
The method you are reading about and the API I'm talking about is described here:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHcFCAW&l=sv-SE