I`m currently trying to communicate with a conductivity controller over RS485. I can receive data when the communication is set to one-way, so I`m assuming I`ve wired the connection properly. My problems occur when I try two-way comms (set on the controller).
The device requires a crc16 to be appended to the send-string. I don`t seem to be able to produce this function in LAbVIEW (Even though the manufacturer ships C code...). Now, I`m not the best C coder in the world, but I THINK I am doing the same thing in my LabVIEW code as in the examples shown here (one VI and two txt files).
Can someone please help me? I have found modbus CRC routines which at least fulfill the crc(text+crc)=0 criteria (but still doesn`t work). The ve
rsion I have coded doesn`t even do this.
As a result, I have several questions (Which I have tried to answer myself, but have failed)
1) can I assume I have my communication wired properly (2-wire DTR control, NI 1-Port USB-485 Adapter)?
2) Does anyone knoow how to (or have an example of) a "CRC16 (CCITT-X.25)" routine? This SHOULD be what I am posting here, but it doesn`t work.
3) Should I just give up programming altogether and declare insanity?
Thanks for anyone who has gotten this far in the message.
Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)