Author |
Message |
Topic: modbus ascii and rtu selection. |
micro_man
Replies: 5
Views: 10985
|
Forum: General CCS C Discussion Posted: Thu Nov 26, 2015 4:55 am Subject: modbus ascii and rtu selection. |
Thanks Ttelmah
So what would be the possible way to do a selection between MODBUS ASCII and MODBUS RTU...
I am seeing in the modbus driver file all these initialization are pre-processor directiv ... |
Topic: modbus ascii and rtu selection. |
micro_man
Replies: 5
Views: 10985
|
Forum: General CCS C Discussion Posted: Wed Nov 25, 2015 10:51 pm Subject: modbus ascii and rtu selection. |
thanks temtronic
I tried a little code but it is not working as i want
#include <18f46k22.h>
#fuses HSH,PUT,NOWDT,NOBROWNOUT
#use delay(crystal=20M)
#use ... |
Topic: modbus ascii and rtu selection. |
micro_man
Replies: 5
Views: 10985
|
Forum: General CCS C Discussion Posted: Wed Nov 25, 2015 6:08 am Subject: modbus ascii and rtu selection. |
Hi
I am using PIC18f46k22
My ccs compiler version is 4.124
I am communicating two devices (based on Modbus) with my microcontroller.
One device is based on RTU and second one is based on ASCII ... |
Topic: putc and printf |
micro_man
Replies: 1
Views: 5627
|
Forum: General CCS C Discussion Posted: Fri Oct 09, 2015 12:20 am Subject: putc and printf |
Hi,
I have a very simple query. I want to send a number using serial port.
e.g
int a=1;
i want to receive 01 instead of 1 at the receiver side.for this purpose i use putc command like that
... |
Topic: CRC and Parity error indication |
micro_man
Replies: 1
Views: 4901
|
Forum: General CCS C Discussion Posted: Sat Aug 17, 2013 6:49 am Subject: CRC and Parity error indication |
Hi,
I am working on modbus 485 (RTU mode). I want to monitor the CRC and Parity Errors, how many times these error comes.
Is there any function in modbus driver file though which i come to know and ... |
Topic: sending coils data from master to slave |
micro_man
Replies: 10
Views: 16356
|
Forum: General CCS C Discussion Posted: Mon Jul 29, 2013 2:29 am Subject: sending coils data from master to slave |
i simplify the program as follows
MASTER
#include "16f870.h"
#fuses HS,NOLVP,NOWDT,NOBROWNOUT,PROTECT, PUT
#use delay(clock=20M)
#define MODBUS_TYPE MODBUS_TYPE_MASTER
# ... |
Topic: sending coils data from master to slave |
micro_man
Replies: 10
Views: 16356
|
Forum: General CCS C Discussion Posted: Thu Jul 25, 2013 1:17 am Subject: sending coils data from master to slave |
guys any idea... |
Topic: sending coils data from master to slave |
micro_man
Replies: 10
Views: 16356
|
Forum: General CCS C Discussion Posted: Wed Jul 24, 2013 3:43 am Subject: sending coils data from master to slave |
The problem is slave not responding.
I have some leds on the slave side. When master will send data to the slave, according to the coil bits leds will be on and off.
Firstly i write a program for sl ... |
Topic: sending coils data from master to slave |
micro_man
Replies: 10
Views: 16356
|
Forum: General CCS C Discussion Posted: Wed Jul 24, 2013 2:05 am Subject: sending coils data from master to slave |
I look into the modbus driver file and found that data is send in terms of an array e.g values
exception modbus_write_multiple_coils(int8 address, int16 start_address, int16 quantity,
... |
Topic: sending coils data from master to slave |
micro_man
Replies: 10
Views: 16356
|
Forum: General CCS C Discussion Posted: Tue Jul 23, 2013 5:40 am Subject: sending coils data from master to slave |
when i change the coil variable manually.it send the data to slave
e.g unsigned int8 coils=0x01,unsigned int8 coils=0x02,unsigned int8 coils=0x03 slave get those values.
But i want to do it autom ... |
Topic: sending coils data from master to slave |
micro_man
Replies: 10
Views: 16356
|
Forum: General CCS C Discussion Posted: Tue Jul 23, 2013 1:51 am Subject: sending coils data from master to slave |
Hi
i want to send coils data from modbus master to slave.
first i write the slave program and sends the data from modbus poll (using PC). it works well. the code for the slave is
#include " ... |
Topic: multiplication problem |
micro_man
Replies: 7
Views: 8928
|
Forum: General CCS C Discussion Posted: Wed Jun 05, 2013 2:51 am Subject: multiplication problem |
I have already initialized result variable b as an int16 bit.Should i also initialize a as an int16 bit? |
Topic: multiplication problem |
micro_man
Replies: 7
Views: 8928
|
Forum: General CCS C Discussion Posted: Wed Jun 05, 2013 2:27 am Subject: multiplication problem |
thanks guys for your replies
are you saying that i can achieve the result by doing something like
b= PRODH*256 + PRODL;
how i search the forum, i mean what should i write in the search bar ... |
Topic: multiplication problem |
micro_man
Replies: 7
Views: 8928
|
Forum: General CCS C Discussion Posted: Wed Jun 05, 2013 2:03 am Subject: multiplication problem |
guys its a very simple program.simply multiplying a variable with 100 and store it in another variable.but the result store in the variable is incorrect.
here is the program
#include <18F252. ... |
|