Jump to content

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

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
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?

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

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.

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.

  • Similar Content

    • By jdeantx
      With exciting projects in oil and gas, aerospace, utilities, and other industries, Vertical AIT is looking to hire skilled LabVIEW developers and architects in the Houston area. We are an Alliance Partner, and we specialize in embedded development.
      Requirements:
      - US citizenship (required by our contracts)
      - Industry experience in production software development
      - Embedded cRIO development experience (Real-time and FPGA)
      - Certification (CLD, CLA, and/or CLED) preferred
      - Must be meticulous and detail-oriented
      We offer great benefits, and we prioritize a healthy work/life balance.
      Learn more about Vertical AIT at www.VerticalAIT.com, and please send resumes to jobs@verticalait.com.
    • By grjgrj
      Hello. I need change some code for SbRIO-9626 with LabVIEW 2018. I have code from LabVIEW 2015. Right now I have only LabVIEW 2018. And I worked with it for SbRIO-9627.
      LabVIEW FPGA, LabVIEW Real-Time, NICRIO1800 driver istalled.
      And I install Xilinx ISE 11.5 Compilation Tool too. 
      When I start compilation FPGA VI I got error about problem with compilation too (see attachment picture).
      Could you tell me how I can solve this problem? 
      It is very important. 

    • By IpsoFacto
      I've got some weird stuff going on with a cRIO project I'm working on wanted to get some opinions on it. The basic architecture is a set of classes that do some process. That process registers with a server. The internal data of the process is held in a DVR and the server get's access to that DVR. Clients use TCP to ask the server to do something, the server makes a call against the classes DVR and returns a response to the client.
      To simplify the issues I'm seeing I created a class that internally just increments an integer every 500ms. The client asks the server what's the current count, the server asks the Counter class and returns the answer to the client. This works perfectly fine when running the VI in the IDE. When built it connects, will get the JSON message back, but always gets a default value from the DVR call (zero, in this case). As soon as I open a remote debug panel to the cRIO, everything is working. The count is correct, the client calls work, just like normal. As soon as I right-click, close debug, it goes back to zero. Open debug works, close debug, back to zero. I know the DVR isn't getting dropped because the count continues to increment while not in debug, the process is still running happily with no issues.
      Here's a few screenshots of the code;
      Count Class process (get the count, increment, write it back to the DVR) - Counter Class process
      You can see the DVR vi's are actually vim's using a cast. I can't imagine that's the issue.
      Server Side call - Server Side calls
      All this does is get the count from the DVR (same as above) and wraps it in JSON and passes it back to the client as a JSON string.
      I also implemented an Echo class that ignores the process and DVR's, it just takes whatever string you sent form the client to the server and passes it back with a prepended "@echo". This works when running as an executable with the debug turned off so I know the client, server, and the server/class calls are all working as expected.
      Any thoughts here would be welcome, thanks.
      edit: I added the any possible errors coming from the variant cast to the JSON reply. When the debug is open there are no errors, when the debugger is closed it throws error 91, but the in-place element structure reading the DVR does not throw any errors. How can a variant not exist until a debugger is opened and than it magically exists?
      edit: the internal data dictionary is a wrapper around a variant attribute, I wired out the "found?" terminal all the way out to the JSON reply and if the debugger is open the attribute is found, but not if the debugger is closed. Anyone have issues with Variant Attributes in Real-Time?
    • By sup93
      Hi. 
      I would like to have the digital trigger high for user input time in seconds.
      Any help is much appreciated. 
      Data Acquisition Final.zip
    • By Nala
      Hello everybody,

      I'm about to write an application that can create a complete new FPGA-Project for the cRIO-system automatically without any user Input.

      Before I ask my question directly, I will give you a few Information about the system and how it works at the moment.
      I'm working with a cRIO-system that can have different modules in different slots (max 8). That system should be universally usable which means I can replace one module with another one at the start up and create a complete new project with a different name.

      Most of the project works (I can find out in which slots which module is placed and load the right VI's correctly) but there is one point which I really dislike: the user always has to give some input Information at the beginning of the creation and mostly that is the same like "Which type of project it should be" or "Which IP address should be used to find the system and the modules for each slot".

      The goal is that I can write down some specific arguments so the program is created automatically?
      Or - if there is no way to do this - a way that a second window is shown on screen to help the user through the creation process (for example that tells the user that the system need to be turned on that the project can find every single module)?

      English isn't my mother tongue, so please apologize if there are any mistakes in my spelling.
      Thank you very much for your help
×
×
  • Create New...

Important Information

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