Hi everyone! I want to say thanks to the authors of the 0MQ library under LabVIEW! It is really a very flexible tool! I have studied and checked almost all patterns, everything works well. However, I have a question: do you plan to release a library that will support UDP sockets?(UDP transport can only be used with the ZMQ_RADIO and ZMQ_DISH socket types)
Best regards,
Victor Sm.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, glad to hear the library has been useful to you!
My understanding is that RADIO and DISH types are presently still in DRAFT status, although they are included in the most recent stable release so I don't see why they couldn't be used. Didn't seem like a lot of work, so I went ahead and did it.
I bumped the library to 4.3.1-stable with drafts enabled so support is there, and added the required extra functionality since messages must be marked with a group (annoyingly the doco doesn't exist so I followed the libzmq test case). I put an example in tests/ that seems to work fine.
You can grab the update from the code repo; if it works for you as well then I'll package up a release.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Martijn Jasperse, thanks for the quick response! I have a question: if I download updates from the repository - it will not break my current projects on an older version of the library? Yes, the library is really usefull. I learned about the technology from network technology programmers. They use it for a long time and they like it. To expand the use of LabVIEW found Your solution. After a series of tests, we were convinced of the functionality of the library in LabVIEW. At the moment I have developed several projects that support dozens of sockets with different patterns. Using ZeroMQ I was able to run my application on several computers at the same time. This frees network developers to create a multitasking server on their own(as is done in TCP/IP). In the future, I want to check the work of the library on Linux for inter-process exchange. Have you checked? Did everything work for you? I mean Linux.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Updaing the library shouldn't break anything significant- I had to add a terminal to the zmq_send VI which means you'll have to relink any VIs that call that one directly, but this is a quick process. There have been no major changes since the last release.
The library has previously been debugged and used for LabVIEW Linux, although it has been some time since that was last tested. I have not tested it with the IPC protocol but I don't forsee any problems. I think there is scope to get that working within the next month.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Martijn Jasperse, thank you very much! I copied the files you added/updated to the repository. Everything works fine for me. As I can see, you have added other patterns(not only DISH-RADIO). That's good! I hope that soon I will be able to test the novelties of this release.
Best regards,
Victor Sm.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've tested building on Linux and with a few minor fixes (now in the repo) it seems to work fine. Previous users have also reported it working on cRIO so it should be fine. If you encounter any specific issues please lodge a bug report.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Martijn Jasperse , I don't see in the repository .so libraries for zeroMQ. You have posted a library for Windows. I have no opportunity now to collect the project and to compile libraries under Linux. Can You add them please? Expansion .so
Thanks you so much!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Shared Objects are not like DLLs; the Linux way is to recompile on your host system as per your host dependencies. I think it is unlikely this will work by just using the binary built on my system but you can try regardless.
I use 64-bit openSUSE and LabVIEW 2014 x64. I tried to compile the so-file with the command: gcc -shared -o lvzmq64.so zmq_labview.c. I get error: fatal error zmq.h : #include <zmq.h> not found. Is there any description of how to build to get .so? May be you know a way with use dll x64 under linux? I think this bad idea, but... Thank's so much for your help!</zmq.h>
Last edit: Smychenko Victor 2019-05-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No you cannot use the DLL under Linux. You have to build your own SO and you need some familiarity with the make process for that. Evidently you do not have the zmq devel headers installed on your build system. I am cannot test x64 Linux myself and NI have released very little information on this platform's internals so I do not know if it will work. I suggest reading up on building shared libraries.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, you're right. I installed zmq devel headers and I don't get this error anymore. However, I have difficulties in further actions. Can You give a link to the further algorithm of actions? As far as I understand, to build under Linux I have to make changes to the source file for zm_labview.c ? Previously, I thought it was a little easier...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Martijn Jasperse , I tried using the Makefile you kindly provided with the library. However, I have a problem. I can't find the right #include <extcode.h>. Could you help with that? I think I'm missing this file as well as possible other dependencies. I do not understand how to compile Your library with other people, and why nobody shared algoritma step by step. Perhaps it's too easy, but for beginners in Linux it would be very convenient. I'm install LabVIEW 2014 x32 , OS OpenSuse x64. Thanks for help!</extcode.h>
upd: I copied file from /usr/local/natinst/LabVIEW-2014/cintools/: extcode.h, fundtypes.h, lv_epilog.h, lv_prolog.h, platdefines.h and moved this file into /usr/include under linux. But I get more warnings and finaly Error 1. But I don't have this file in my build folder before assembly(use make). I checked. As he emerges? I tried to use it, but LabVIEW says that it is impossible to call this file.
Look is it:
make -f makefile
cc -shared -o ../lvzmq32.so zmq_labview.c -DZMQ_BUILD_DRAFT_API -Wall -O3 -fpic -pthread -I /usr/local/natinst/LabVIEW-2014/cintools -L /usr/local/natinst/LabVIEW-2014/cintools -lzmq -llvrt
zmq_labview.c: In function ‘lvzmq_close’:
zmq_labview.c:108:11: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
int ret, i; void sock;
^
zmq_labview.c: In function ‘lvzmq_ctx_create_reserve’:
zmq_labview.c:221:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] pinstdata = bonzai_init(( void )ninits );
^
zmq_labview.c: In function ‘lvzmq_send’:
zmq_labview.c:464:2: warning: implicit declaration of function ‘zmq_msg_set_group’ [-Wimplicit-function-declaration]
if ( group && group ) zmq_msg_set_group( &msg, group );
^
zmq_labview.c: In function ‘lvzmq_receiver_thread’:
zmq_labview.c:581:11: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
int ret, err;
^
zmq_labview.c: In function ‘lvzmq_join’:
zmq_labview.c:828:2: warning: implicit declaration of function ‘zmq_join’ [-Wimplicit-function-declaration]
ret = zmq_join( s->sock, group );
^
zmq_labview.c: In function ‘lvzmq_leave’:
zmq_labview.c:836:2: warning: implicit declaration of function ‘zmq_leave’ [-Wimplicit-function-declaration]
ret = zmq_leave( s->sock, group );
^
cp: «../lvzmq32.so» and «/usr/local/natinst/LabVIEW-2014/vi.lib/addons/zeromq/lvzmq32.so» - The same file
make: *** [all] Error1
Last edit: Smychenko Victor 2019-05-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The warnings indicate that the version of libzmq you have installed was not built with the draft APIs enabled. Remember, the RADIO/DISH pattern is not included in the standard release yet, which is why ZMQ_BUILD_DRAFT_API is required. The compiler complaining about implicit declarations means they were not built in the version you have installed (probably the openSUSE default). Try downloading a compatible binary release from http://zeromq.org/intro:get-the-software (with DRAFT APIs)
I don't see a great way to detect whether the installed version has the required functions available but maybe I can think of something.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone! I want to say thanks to the authors of the 0MQ library under LabVIEW! It is really a very flexible tool! I have studied and checked almost all patterns, everything works well. However, I have a question: do you plan to release a library that will support UDP sockets?(UDP transport can only be used with the ZMQ_RADIO and ZMQ_DISH socket types)
Best regards,
Victor Sm.
Hi, glad to hear the library has been useful to you!
My understanding is that RADIO and DISH types are presently still in DRAFT status, although they are included in the most recent stable release so I don't see why they couldn't be used. Didn't seem like a lot of work, so I went ahead and did it.
I bumped the library to 4.3.1-stable with drafts enabled so support is there, and added the required extra functionality since messages must be marked with a group (annoyingly the doco doesn't exist so I followed the libzmq test case). I put an example in tests/ that seems to work fine.
You can grab the update from the code repo; if it works for you as well then I'll package up a release.
Martijn Jasperse, thanks for the quick response! I have a question: if I download updates from the repository - it will not break my current projects on an older version of the library? Yes, the library is really usefull. I learned about the technology from network technology programmers. They use it for a long time and they like it. To expand the use of LabVIEW found Your solution. After a series of tests, we were convinced of the functionality of the library in LabVIEW. At the moment I have developed several projects that support dozens of sockets with different patterns. Using ZeroMQ I was able to run my application on several computers at the same time. This frees network developers to create a multitasking server on their own(as is done in TCP/IP). In the future, I want to check the work of the library on Linux for inter-process exchange. Have you checked? Did everything work for you? I mean Linux.
Updaing the library shouldn't break anything significant- I had to add a terminal to the zmq_send VI which means you'll have to relink any VIs that call that one directly, but this is a quick process. There have been no major changes since the last release.
The library has previously been debugged and used for LabVIEW Linux, although it has been some time since that was last tested. I have not tested it with the IPC protocol but I don't forsee any problems. I think there is scope to get that working within the next month.
Martijn Jasperse, thank you very much! I copied the files you added/updated to the repository. Everything works fine for me. As I can see, you have added other patterns(not only DISH-RADIO). That's good! I hope that soon I will be able to test the novelties of this release.
Best regards,
Victor Sm.
I've tested building on Linux and with a few minor fixes (now in the repo) it seems to work fine. Previous users have also reported it working on cRIO so it should be fine. If you encounter any specific issues please lodge a bug report.
Martijn Jasperse , I don't see in the repository .so libraries for zeroMQ. You have posted a library for Windows. I have no opportunity now to collect the project and to compile libraries under Linux. Can You add them please? Expansion .so
Thanks you so much!
Shared Objects are not like DLLs; the Linux way is to recompile on your host system as per your host dependencies. I think it is unlikely this will work by just using the binary built on my system but you can try regardless.
I use 64-bit openSUSE and LabVIEW 2014 x64. I tried to compile the so-file with the command: gcc -shared -o lvzmq64.so zmq_labview.c. I get error: fatal error zmq.h : #include <zmq.h> not found. Is there any description of how to build to get .so? May be you know a way with use dll x64 under linux? I think this bad idea, but... Thank's so much for your help!</zmq.h>
Last edit: Smychenko Victor 2019-05-20
No you cannot use the DLL under Linux. You have to build your own SO and you need some familiarity with the make process for that. Evidently you do not have the zmq devel headers installed on your build system. I am cannot test x64 Linux myself and NI have released very little information on this platform's internals so I do not know if it will work. I suggest reading up on building shared libraries.
Yes, you're right. I installed zmq devel headers and I don't get this error anymore. However, I have difficulties in further actions. Can You give a link to the further algorithm of actions? As far as I understand, to build under Linux I have to make changes to the source file for zm_labview.c ? Previously, I thought it was a little easier...
Martijn Jasperse , I tried using the Makefile you kindly provided with the library. However, I have a problem. I can't find the right #include <extcode.h>. Could you help with that? I think I'm missing this file as well as possible other dependencies. I do not understand how to compile Your library with other people, and why nobody shared algoritma step by step. Perhaps it's too easy, but for beginners in Linux it would be very convenient. I'm install LabVIEW 2014 x32 , OS OpenSuse x64. Thanks for help!</extcode.h>
upd: I copied file from /usr/local/natinst/LabVIEW-2014/cintools/: extcode.h, fundtypes.h, lv_epilog.h, lv_prolog.h, platdefines.h and moved this file into /usr/include under linux. But I get more warnings and finaly Error 1. But I don't have this file in my build folder before assembly(use make). I checked. As he emerges? I tried to use it, but LabVIEW says that it is impossible to call this file.
Look is it:
make -f makefile
cc -shared -o ../lvzmq32.so zmq_labview.c -DZMQ_BUILD_DRAFT_API -Wall -O3 -fpic -pthread -I /usr/local/natinst/LabVIEW-2014/cintools -L /usr/local/natinst/LabVIEW-2014/cintools -lzmq -llvrt
zmq_labview.c: In function ‘lvzmq_close’:
zmq_labview.c:108:11: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
int ret, i; void sock;
^
zmq_labview.c: In function ‘lvzmq_ctx_create_reserve’:
zmq_labview.c:221:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
pinstdata = bonzai_init(( void )ninits );
^
zmq_labview.c: In function ‘lvzmq_send’:
zmq_labview.c:464:2: warning: implicit declaration of function ‘zmq_msg_set_group’ [-Wimplicit-function-declaration]
if ( group && group ) zmq_msg_set_group( &msg, group );
^
zmq_labview.c: In function ‘lvzmq_receiver_thread’:
zmq_labview.c:581:11: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
int ret, err;
^
zmq_labview.c: In function ‘lvzmq_join’:
zmq_labview.c:828:2: warning: implicit declaration of function ‘zmq_join’ [-Wimplicit-function-declaration]
ret = zmq_join( s->sock, group );
^
zmq_labview.c: In function ‘lvzmq_leave’:
zmq_labview.c:836:2: warning: implicit declaration of function ‘zmq_leave’ [-Wimplicit-function-declaration]
ret = zmq_leave( s->sock, group );
^
cp: «../lvzmq32.so» and «/usr/local/natinst/LabVIEW-2014/vi.lib/addons/zeromq/lvzmq32.so» - The same file
make: *** [all] Error1
Last edit: Smychenko Victor 2019-05-22
The warnings indicate that the version of libzmq you have installed was not built with the draft APIs enabled. Remember, the RADIO/DISH pattern is not included in the standard release yet, which is why ZMQ_BUILD_DRAFT_API is required. The compiler complaining about implicit declarations means they were not built in the version you have installed (probably the openSUSE default). Try downloading a compatible binary release from http://zeromq.org/intro:get-the-software (with DRAFT APIs)
I don't see a great way to detect whether the installed version has the required functions available but maybe I can think of something.