06-13-2016 03:51 PM
Hi kees
In manual i found this.
"Note: The actual start address of register 6 is 5. All data in [ ] is in 8 bits Hex format."
So for the register 7 (frequency output) I must use 6 instead the 7 that I kill my day try understanding output data.
Will see tomorrow with 6 instead 7.
Best regards
cpalka
06-14-2016 01:44 AM
Hi,
Yes that is always confusing.
At DCS (control system) 'they' use command 4 to read address 1 the notation is 40001
At ModBus this is command 3 address 0
Your list starts at 1 and it is normal that ModBus addressing starts at 0.
Kees
06-14-2016 05:56 AM
Hi Kees
Finally it works!
But seems something is wrong
Seems that use the substring 1st bit until 256
So my code reads roght readings until 25.6 Hz after that gos 0.
64B9 - 10.0Hz (converting 64 to decimal gives 100)
C8B9 - 20Hz so C8 is 200 in decimal
2CB8 - 30Hz (now I have in my program 4.4Hz (shoul be 44 converting 2C) but why can't get 300 for 30.0Hz???
There should be about 256 bits but I could not understand I used a 16 bits convert but always gives 0
06-14-2016 06:13 AM
Hi,
I don't understand your 256 bits. One register is 16 bits. You can ask for 16 registers to get 25 bits of data.
the 64B9, C8B9 and 2CB8 are 2 bytes but I think the last byte is the first byte of the CRC. The byte with 0 before the 64 is the high byte of the register.
06-14-2016 07:43 AM
Hi Kees
You are always right.
What a mistake about the substring
No I can get the right substring and get values over 256 (25.6Hz)
Thanks a lot
A let last version for other user that can use it.
Now As I now read register I will try write registers (as start/stop and change frequency)
Best regards
cpalka
06-14-2016 09:18 AM
Hi Kees
I make a new version and now I can start, stop, and 3rd option to write or read string, depends the data writed.
1- Do you know a better way to put start/stop sparetly
2- a frequency adjuster (here the dificult is to calculate crc for each frequency adjusted.
3- all reader paramters (frequency and torq) always reading
My example works with only a case structure (start, stop, write or read string)
Best
cpalka
06-15-2016 01:47 AM
Hi,
1- Use an event structure for all (user)events
2- attached my CRC calc. Input is just text like 0108008844 output is a Data string displayed in Hex with CRC like 0108 0088 447D 93
I think you have to learn some LabVIEW basics. There are enough examples, books and other learning option on the internet.
To help you with a complete application would cost me too much time which I don't have.
Always there to help with specific questions.
Kees
06-15-2016 04:24 PM
Hi Kees
You are no the 1st person that tell me this,
I am a civil engineer, and I am working in a researching lab, and here we need to do everything, laboratory tests, developt new equipement, programm it (always different, sometimes with NI DAQs, somtimes with arduinos, sometimes with datatakers, now with drives). I do it (improve the equiperments) because i love electronics and i now that will give reacher results with our equipements. And manufacturs for example from invertek drives they give informations as we are a advanced programmer or buying a licence to the software control the drive???? The machine that has the drive cost a lots of money and was made with our ideas because if you buy a industrial machine normally is closed to changes and in research closed softwares or machines is no aceptable. researching is doind what was never done before, so we need to improvise many times.
tomorrow I will test your example
Thanks for supporting and once again be patient.
Best regards
cpalka
06-15-2016 04:37 PM
Hi Kees
Seems not calculate right, please test the strings below if you get for the first 640B and secound 05C8
0103 0006 0001 640B
0103 0008 0001 05C8
CPalka
06-15-2016 04:47 PM
Hi Kees
You think the example here in modbus works with my drive?
Please see last post, I could not understand where I input the registers numbers