Hello together,
my name is Christopher. I am not that experienced in programming and zmq jet, but would like to change that. :)
So I have a question about a project I would like to implement. I hope you guys can help me, that would be nice.
The idea is to realize a program in LV that is collection some data, PUSH it to a pipeline and another LV program collects these data via PULL. It it necassary for me to use zmq at this project. My first step was to build these two ports who are building up communications.
You can find my programs in the attached files.
It is kind of working but I've got two problems that needs to be solved and I don't know how.
1) When I run the zmq_push.vi whitout starting the zmq_pull.vi the zmq subVI called "Send Data" stucks. There is no possibility to set a timeout and the programm has to be closed (via task manager!) if a connection could not be established. Thats a problem I think. Do you have an idea how to work around there?
2) When I run zmq_push.vi and after that zmq_pull.vi the data can be collected whitout any problems. But in highlight-mode in LV I've noticed that my zmq_push.vi pushes the data inside the pipeline whitout waiting for the zmq_pull.vi to collect them. So I think if the data is generated faster than it can be collected (I've simulated that with 500ms waiting in the zmq_pull.vi) problems will accure.
Do you have any idea how to make the zmq_push.vi wait for the data to be read from zmq_pull.vi until new data is written?
I hope you guys can help me out at that point, would be very nice!
Thanks a lot and have a nice day :)
To answer your questions as far as I have experienced with Push Pull sockets:
1) It is right that it will block unless you start the 'Pull' socket and process the data. As per documentation states, in this mode i.e; Pipeline (Push-Pull), no data is lost or dropped if the relevant ends are not present. And that the Push -Pull type socket would go into mute state when it reaches its HWM (sndHWM and rcvHWM).
2) One option could be is that you open a parallel req-rep socket and forward the 'Start' message to your 'Push' socket, once all data is processed at 'Pull' socket. You could also define individual HWM at both ends so that you have a count on how many msg packets are to be handled.
I hope this helps!
Shunta
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello together,
my name is Christopher. I am not that experienced in programming and zmq jet, but would like to change that. :)
So I have a question about a project I would like to implement. I hope you guys can help me, that would be nice.
The idea is to realize a program in LV that is collection some data, PUSH it to a pipeline and another LV program collects these data via PULL. It it necassary for me to use zmq at this project. My first step was to build these two ports who are building up communications.
You can find my programs in the attached files.
It is kind of working but I've got two problems that needs to be solved and I don't know how.
1) When I run the zmq_push.vi whitout starting the zmq_pull.vi the zmq subVI called "Send Data" stucks. There is no possibility to set a timeout and the programm has to be closed (via task manager!) if a connection could not be established. Thats a problem I think. Do you have an idea how to work around there?
2) When I run zmq_push.vi and after that zmq_pull.vi the data can be collected whitout any problems. But in highlight-mode in LV I've noticed that my zmq_push.vi pushes the data inside the pipeline whitout waiting for the zmq_pull.vi to collect them. So I think if the data is generated faster than it can be collected (I've simulated that with 500ms waiting in the zmq_pull.vi) problems will accure.
Do you have any idea how to make the zmq_push.vi wait for the data to be read from zmq_pull.vi until new data is written?
I hope you guys can help me out at that point, would be very nice!
Thanks a lot and have a nice day :)
Christopher
Hi Christopher,
To answer your questions as far as I have experienced with Push Pull sockets:
1) It is right that it will block unless you start the 'Pull' socket and process the data. As per documentation states, in this mode i.e; Pipeline (Push-Pull), no data is lost or dropped if the relevant ends are not present. And that the Push -Pull type socket would go into mute state when it reaches its HWM (sndHWM and rcvHWM).
2) One option could be is that you open a parallel req-rep socket and forward the 'Start' message to your 'Push' socket, once all data is processed at 'Pull' socket. You could also define individual HWM at both ends so that you have a count on how many msg packets are to be handled.
I hope this helps!
Shunta