...to communicate with Uniflow2


vulic

Recommended Posts

Regards !

I have made 3 aplications with DAQFactory and equipment with Modbus protocol for communication and I am more than satisfied...

Now...

I am trying to communicate with Uniflow2 pulse genarator for two days but I have a problem and I need Your help... ( attached is the manual - appendix D - the protocol specifications ).

I have connected with RS232 on the generator and set the generator to Master... When the unit is working and set to MASTER it sends the Report of reflow automatic after each cycle with temperature values etc.

( attached is the comm monitor screen ).

I have two problems...

1. How can I put the 3 temperature values ( bold ) which are in my Rx-s to into my 3 channels?

Rx: 014849828248505348494449515044525749\044525555\044525555\04448515244484804

2. When I set the generator to SLAVE and send the command in form <soh>"01RR02560"<eot> ( I believe that this should be the right one ... ) through the monitor window ( Output string: ) - noting happens ... I do not have any response from the generator no matter what i send... I tried more commands from the manual...but nothing... What I am doing wrong ?

I would like to communicate with generator as SLAVE because there are 10 of them in production and in the future I could connect them with RS485...

Thanks in advance !

Uniflow2_manual.pdf

uniflow2.bmp

Link to comment
Share on other sites

To read the master string, use readuntil(44). This will return a string up to the 44. Then you can do right(datain,6) where datain is the variable you stored the result from readuntil(44) into. This will pull out those 6 digits. Repeat for the three values. The hard part is aligning the frame.

As for slave mode, I think you are entering the wrong string, or at least you aren't translating what they show into what they mean. <soh>01RR02560<eot> requires you to type this into the output window:

[\backslash]00101RR025960[\backslash]004

The browser won't let me enter an actual backslash here, so replace [\backslash] with just the backslash character.

This assumes you have the checksum correct. I believe you actually do not (or 60 is not the checksum and you forgot the checksum). I get 9C, so:

[\backslash]00101RR02599C[\backslash]004

To calc the checksum in DAQFactory:

private string command = "01RR025"

private string checksum = format("%2X",sum(asca(command)) & 0xff)

private string out = chr(1) + command + checksum + chr(4)

device.mydevice.write(out)

You can change command at will, and the rest should still work.

asca(command) converts the string to an array of bytes. sum(...) sums those bytes. ... & 0xff AND's the result with 0xff. Format("%2X",..) formats the result as a two byte ascii hex value. This is, I believe what the docs say to do.

Link to comment
Share on other sites

Hello !

Many thanks for the hints...

I have followed Your instructions and I am able to put three temperatures into channels when generator is in MASTER mode...

I have still not resolved the problem when the genarator is in SLAVE mode...in other words...Sequence that You have sent me is working fine because i have tested it with the command example in the manual... I send the command from the sequence and the generator answers me imediately..

But when I send my command also from the sequence to recieve te ReflowReport the generator does not answer...I am now confused...as in the manual says that when set to slave , the genarator will answer to Raed and Set commands...

What am I missing here... :blink:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.