07-30-2007 10:15 AM - edited 07-30-2007 10:15 AM
Message Edited by altenbach on 07-30-2007 08:16 AM
07-30-2007 10:17 AM
07-30-2007 10:21 AM
Ok, you need to realize you talking to a labview idiot. You are a god in labwiew and I just bumble through things.When you say that the number is already in binary, I don't really know what you mean by this. Yes I am aware that computers speak in binary, but what does this mean to me? If i was to type in 12000 into a numeric control that was type I16 with radix displayed and set as decimal, and then I wired the output of that Directly to VISA WRITE, are you saying it is already in binary without any need for conversion? When i probe the wire, It still says 12000, not 10111011100000
07-30-2007 10:24 AM
That doesn't make any sense. You cannot wire a numeric control to VISA Write. Even if you could, did you ever stop to think that the probe display is not set to display binary.
Read my answer about using the Type Cast.
07-30-2007 10:25 AM
07-30-2007 10:29 AM
07-30-2007 10:40 AM
07-30-2007 12:42 PM
So I have talked at length with the manufaturer about the code formatting. It is very complicated.
I can send information as strings in hex number format. apparently LABVIEW knows to send this via binary thru the serial cable?
How exactally do I use this typecast block.
I am going to re-start my code using the examle dennis pointed me twords, thank you. Its seems to be a good start.
I need to make some controls to start/stop the motor, change the speed, and request the information bundle from the motor controller.
07-30-2007 01:05 PM
I need to somehow count the bytes that I am sending in my message. This is the first section of the message to the FC80, how many bytes I am going to send before I stop.
This includes the checksum, which needs to also be calculated, as well as the block count which needs to be calculated, as well as the Byte cuonter.
So lets figure out:
How do I count the numbe rof bytes i want to send, and then include this in the message, have a rolling block counter that increments every time i SEND a message and has valid values of 0-255.
Then the Checksum is the summation of bits from the first 7 items in the message I send to the controller, which shult result in a 3 digit number. To calculte the checksum you discard the first digit in the total, and in hex subtract those two remaining digits from "FF", then Add one. Then convert that number back to hex, and that is the checksum.
My head is exploding from the complexity of this.
07-30-2007 01:46 PM - edited 07-30-2007 01:46 PM
here is the VI I started, Its not much more than the example and the 8 parts of the message, 4 of which need to be calculated.
how do i use that typecast to smash it all down to a HEX string??
Message Edited by Vr6Fidelity on 07-30-2007 01:46 PM