03-03-2016 10:02 AM
Hi,
I have a device (EMD High voltage generator) that I am trying to communicate with. The device manual reads:
An input to the generator (RTS line), when held high, inhibits the generator from transmitting the network initialization message (communication is disabled). After communication has been established, the generator initiates no message transfer. The external controller must request any required information from the generator.
When a device receives a message, it must return the following acknowledgement message to the original sender: 1. 06h 2. 03h
If the sender receives no acknowledgement within 200 ms, the message is retransmitted once and, if necessary, twice; then, the sender will await further instructions from the receiver.
From this I assume that the generator is continouslsy sending a network initializiation message, which the external communicator (my labview code) has to pick up on and then respond with 0603. I have looked at the basic read/write sample code but I'm not sure if that is the right way to approach this (since I am trying to read continuous data that is being sent by the generator).
I would really appreciate a point in the right direction,
Thanks
03-03-2016 10:14 AM
03-03-2016 10:24 AM
Could you give me an example of code?
Thanks
03-03-2016 10:29 AM
For example, would this edited VI work?
Also I know the message I am recieving is 8 bytes, so what should I set the readcount to?
03-03-2016 10:37 AM
03-03-2016 10:51 AM
I am looking at pages 5 and 6.
Thanks
03-03-2016 10:58 AM
@mnanda98 wrote:For example, would this edited VI work?
Also I know the message I am recieving is 8 bytes, so what should I set the readcount to?
From the start there is a big issue with your vi. You have a 5 ms loop delay and your Write button mechanical action is set to Switch When Released. Try the following vi, you will probably get over 20 Write action triggered even if you click as fast as you can on the Write button. Now change the mechanical action to Latch When Released and see the difference.
Ben64
03-03-2016 11:19 AM
Ok, but I am trying to read the data primarily for my purposes.. Would this program work for reading data the is continuously being sent by the generator?
03-03-2016 11:29 AM
03-03-2016 12:13 PM
How do you know 6 bytes?