Jump to content
News about the LabVIEW Wiki! Read more... ×

Recommended Posts

Hello!

I'm trying to use AMQP protocol to send data from a CRIO.

I've tried using LabbitMQ and zeroMQ libraries, and when I test it from my computer (windows), it works with no problems.

But when I try to put the code on CRIO, there's a lot of errors caused by broken wires. It looks like a .dll or .NET incompatibility.

Is there any compatible library for CRIO or some clues about how to make it works?

Error_LabbitMQ.PNG

Share this post


Link to post
Share on other sites

You definitely cannot use a .NET library on a cRIO. .NET is Windows-only.

Share this post


Link to post
Share on other sites
1 hour ago, ned said:

You definitely cannot use a .NET library on a cRIO. .NET is Windows-only.

Correction: you cant use .net *from labview* on a cRIO. You can always install mono, maybe even the .net standard or core or whatever they call it. Admittedly this doesnt help marcos, but...

 

Someone made a native amqp client, which is here: https://github.com/tweeto/AMQP-Client

Never used it myself, but they say they tested against rabbit. Edit: it looks like the user did not actually include their code...just the lvclass files :/

I think there used to be a native amqp implementation on the community but I can't find it since the switch over. I dont know if the above is the same one.

4 hours ago, Marcos dos Santos said:

I've tried using LabbitMQ and zeroMQ libraries, and when I test it from my computer (windows), it works with no problems

To be clear, zeromq has nothing to do with amqp except that the authors of zeromq hated amqp enough to write zeromq. I used to have a long article on the ni.com community about how to cross compile zeromq for linux, but I can't find it since they moved to the new community format (even though its my own document). In any case, you would need to cross compile and then the zeromq library should in theory work. 

 

Edited by smithd
  • Like 1

Share this post


Link to post
Share on other sites

Thank you very much, guys!

19 hours ago, smithd said:

Someone made a native amqp client, which is here: https://github.com/tweeto/AMQP-Client

Never used it myself, but they say they tested against rabbit. Edit: it looks like the user did not actually include their code...just the lvclass files :/

You're right... there's no .vi's on that. 

19 hours ago, smithd said:

Correction: you cant use .net *from labview* on a cRIO. You can always install mono, maybe even the .net standard or core or whatever they call it. Admittedly this doesnt help marcos, but...

I'll search something about that... maybe it could work. What do you think?

Share this post


Link to post
Share on other sites
2 hours ago, Marcos dos Santos said:

I'll search something about that... maybe it could work. What do you think?

Well you'd basically have to write a program in .net which takes, for example, TCP messages, and plops them on an AMQP queue. It would be doable, but annoying.

A similar but slightly preferable mechanism would be to write a windows host program that your cRIOs talk to using plain TCP. This windows host program could do the interfacing to AMQP and potentially run on the same machine as amqp.

A different route entirely would be to use the rabbitmq adapter for the MQTT protocol. I've never used the adapter, but the protocol is very simple and there are plenty of native labview implementations available (real ones, with all the code intact, like: https://github.com/DAQIO/LVMQTT)

I would say your best bet would be to learn how to call DLLs in labview and directly call one of the C APIs for rabbit. 

Eventually, as I understand it this toolset will use AMQP behind the scenes: http://www.ni.com/documentation/en/systemlink/ear/manual/skyline-data-services/
But at present its on early access release

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use.